Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CommCoreModule] capture primitive parameter by value
Summary: Fixes regression introduced in D8887. This is a solution for [ENG-4926](https://linear.app/comm/issue/ENG-4926/client-backup-upload-issue). 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`. Reviewers: michal, bartek, marcin, tomek Reviewed By: bartek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D9197
- Loading branch information