Page MenuHomePhabricator

[lib] Fail signing device list if called by secondary device
ClosedPublic

Authored by bartek on Aug 11 2024, 3:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 1:13 AM
Unknown Object (File)
Sun, Nov 3, 5:44 AM
Unknown Object (File)
Tue, Oct 22, 1:16 PM
Unknown Object (File)
Tue, Oct 22, 9:14 AM
Unknown Object (File)
Tue, Oct 22, 8:32 AM
Unknown Object (File)
Tue, Oct 22, 8:32 AM
Unknown Object (File)
Sep 24 2024, 8:34 PM
Unknown Object (File)
Sep 22 2024, 7:47 PM
Subscribers

Details

Summary

Made signDeviceList() throw when called from non-primary devices.

Test Plan
  • Unit tests - needed to update them because otherwise mocked primaryContentSigningKey was different than primary device ID from device lists and some tests failed on the throw added in this diff - this proofs that it actually works.
  • Tested manually

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Aug 12 2024, 12:08 AM
lib/shared/device-list-utils.js
145 ↗(On Diff #43295)

Will this error get caught somewhere? I'm worried about the app crashing here

kamil added inline comments.
lib/shared/device-list-utils.js
145 ↗(On Diff #43295)

While adding the device (scanning QR) it is caught here to show the alert.

If we sign the device list as a result of P2P messages from other own devices, this error is also caught here.

This revision is now accepted and ready to land.Aug 12 2024, 8:15 AM
This revision was landed with ongoing or failed builds.Aug 19 2024, 4:42 AM
This revision was automatically updated to reflect the committed changes.