Page MenuHomePhabricator

[native][lib] Gate encrypted media uploads on Comm staff community
ClosedPublic

Authored by ashoat on Apr 6 2023, 1:08 PM.
Tags
None
Referenced Files
F3399080: D7335.id24763.diff
Mon, Dec 2, 1:42 AM
F3398657: D7335.diff
Sun, Dec 1, 11:55 PM
Unknown Object (File)
Sat, Nov 9, 9:09 AM
Unknown Object (File)
Fri, Nov 8, 9:59 AM
Unknown Object (File)
Fri, Nov 8, 9:59 AM
Unknown Object (File)
Wed, Nov 6, 5:14 PM
Unknown Object (File)
Tue, Nov 5, 2:32 AM
Unknown Object (File)
Tue, Nov 5, 2:31 AM
Subscribers

Details

Summary

We're initially launching this to the Comm staff community so we can test things out.

Test Plan

I loaded up my local dev environment, which has a mirrored copy of the Comm community.

  1. I uploaded an encrypted photo to the Comm community root from native and confirmed it appeared as encrypted in the MySQL database (has an encryptionKey)
  2. I uploaded an encrypted photo to the Comm dev team channel from native and confirmed it appeared as encrypted in the MySQL database (has an encryptionKey)
  3. I confirmed I was able to view the encrypted media from the web
  4. I confirmed I was able to view the encrypted media from native, but only after the initial upload
  5. I confirmed that after logging out and back in on native, the encrypted media upload appears as a messageTypes.UNSUPPORTED ("ashoat sent a photo")
  6. I uploaded a photo to a different chat and confirmed it was NOT encrypted
  7. I uploaded a photo to the Comm dev team channel from the web and confirmed it was NOT encrypted
  8. I sent a message with a photo and a video to the Comm community root from native and confirmed it resulted in three encrypted uploads in the MySQL database (all had an encryptionKey, one was for the thumbnail) and that the video was viewable from the web

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lib/shared/thread-utils.js
1565 ↗(On Diff #24746)

The community root will not have anything set for the community field, so we need to special-case that. I introduced this utility function in the hopes that it will make this nuance less likely to be missed in the future

ashoat requested review of this revision.Apr 6 2023, 1:24 PM

Would be great to test a MULTIMEDIA message with eg 1 video, 1 video + 1 image, 2 videos in addition to photos mentioned in Test Plan (if not done already)

This revision is now accepted and ready to land.Apr 6 2023, 3:00 PM
In D7335#218238, @atul wrote:

Would be great to test a MULTIMEDIA message with eg 1 video, 1 video + 1 image, 2 videos in addition to photos mentioned in Test Plan (if not done already)

Updated Test Plan