Page MenuHomePhabricator

[CommCoreModule] capture primitive parameter by value
ClosedPublic

Authored by kamil on Sep 14 2023, 1:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Feb 6, 12:17 PM
Unknown Object (File)
Wed, Jan 22, 11:32 AM
Unknown Object (File)
Jan 11 2025, 6:56 PM
Unknown Object (File)
Jan 10 2025, 8:25 PM
Unknown Object (File)
Jan 6 2025, 2:12 AM
Unknown Object (File)
Jan 6 2025, 2:12 AM
Unknown Object (File)
Jan 6 2025, 2:12 AM
Unknown Object (File)
Jan 6 2025, 2:00 AM
Subscribers

Details

Summary

Fixes regression introduced in D8887.

This is a solution for ENG-4926.

When the code gets to run, the outer function generateRandomString may have already returned. This means that size might have been destroyed, and there is an undefined reference. That's why this function generates backupID with length 0 and as an effect causes Argon2 to throw salt too short.

On dev everything worked, everything happens only on prod when code is more optimized.

I also added casting to the correct type.

Test Plan

Test upload protocol in Release mode.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable