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)
Wed, Sep 18, 6:57 AM
Unknown Object (File)
Mon, Sep 16, 3:16 AM
Unknown Object (File)
Mon, Sep 16, 3:16 AM
Unknown Object (File)
Sun, Sep 15, 9:06 AM
Unknown Object (File)
Sun, Sep 15, 9:06 AM
Unknown Object (File)
Thu, Sep 12, 5:16 PM
Unknown Object (File)
Tue, Sep 10, 4:27 AM
Unknown Object (File)
Sun, Sep 8, 12:27 AM
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.