Page MenuHomePhabricator

Put collapse key in encrypted MacOS notification payload
ClosedPublic

Authored by marcin on Dec 4 2023, 11:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 8:22 AM
Unknown Object (File)
Fri, Nov 22, 8:02 AM
Unknown Object (File)
Fri, Nov 22, 7:53 AM
Unknown Object (File)
Fri, Nov 22, 2:22 AM
Unknown Object (File)
Thu, Nov 21, 4:49 AM
Unknown Object (File)
Thu, Nov 21, 4:49 AM
Unknown Object (File)
Thu, Nov 21, 4:49 AM
Unknown Object (File)
Thu, Nov 21, 4:49 AM
Subscribers

Details

Summary

This differential fixes urget issue:
https://linear.app/comm/issue/ENG-6010/invariant-violation-collapsible-notifications-encryption-currently-not.
We want to keep the invariant active since it protects us against accidentally exposing unencrypted
collapseID in notification headers. We just need to put it in notification payload for MacOS notifs as well.
Putting collapseID in notification.collapseID results in collapseID being exposed in notification
headers. Putting it in notification.payload results in collapseID being encrypted.

Test Plan
  1. Build MacOS desktop app.
  2. Send collapsible notifications (chenge the color of the thread for instance).
  3. Ensure that notifications are displayed correctly and version field in MariaDB of relevant olm session

is incremented with each notification.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

keyserver/src/push/send.js
970 ↗(On Diff #34262)

This is a weird condition to see. Why are the conditions for iOS and macOS named differently? Can we rename them to be more similar? And maybe canDecryptIOSNotifs can be more like iosCanOnlyDecryptNonCollapsibleNotifs or something?

Enhance variable naming in contitions that determine whether notifications should be encrypted

Much better with the naming change

This revision is now accepted and ready to land.Dec 5 2023, 6:43 AM