HomePhabricator
Diffusion Comm 798e3599316a

[CommCoreModule] capture primitive parameter by value

Description

[CommCoreModule] capture primitive parameter by value

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.

Reviewers: michal, bartek, marcin, tomek

Reviewed By: bartek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D9197

Details

Provenance
kamilAuthored on Sep 14 2023, 1:06 AM
Reviewer
bartek
Differential Revision
D9197: [CommCoreModule] capture primitive parameter by value
Parents
rCOMMd583b31f6863: [Tunnelbroker] update integration tests to handle auth device
Branches
Unknown
Tags
Unknown