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
Unknown Object (File)
Sat, Jun 29, 3:39 PM
Unknown Object (File)
Sat, Jun 29, 3:40 AM
Unknown Object (File)
Wed, Jun 26, 4:52 PM
Unknown Object (File)
Wed, Jun 26, 7:48 AM
Unknown Object (File)
Mon, Jun 24, 11:37 PM
Unknown Object (File)
May 30 2024, 3:46 AM
Unknown Object (File)
May 28 2024, 8:15 AM
Unknown Object (File)
May 28 2024, 8:15 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