Page MenuHomePhabricator

[keyserver] Convert upload responders
ClosedPublic

Authored by michal on May 15 2023, 3:57 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 10:51 AM
Unknown Object (File)
Sat, Nov 16, 10:39 AM
Unknown Object (File)
Sat, Nov 2, 9:27 AM
Unknown Object (File)
Oct 28 2024, 8:57 AM
Unknown Object (File)
Oct 21 2024, 9:04 PM
Unknown Object (File)
Oct 15 2024, 6:08 AM
Unknown Object (File)
Oct 9 2024, 1:43 PM
Unknown Object (File)
Oct 9 2024, 4:13 AM
Subscribers

Details

Summary

Adds validators for upload responders.

Depends on D7807

Test Plan

Try sending a photo and a video, check if there are any errors.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek added inline comments.
keyserver/src/uploads/uploads.js
223 ↗(On Diff #26448)

Why the original type was concrete instead of any / mixed? Do we have to replace it with mixed?

This revision is now accepted and ready to land.May 16 2023, 3:32 AM
keyserver/src/uploads/uploads.js
223 ↗(On Diff #26448)

@tomek Not sure, I think it was just a mistake, I can't find any additional input validation for this responder in particular.
I also tested it just now and was able to send anything to this responder and it only tripped on the newly added validateInput.

Rebase, validate uploadMediaMetadataResponder, fix bug with uploadDownloadResponder

michal added inline comments.
keyserver/src/uploads/uploads.js
158

These are not converted because they come from the upload URI. We could convert them here but then on the output side we would need to convert them by adding a new tURI and then have the conversion function parse the URL and convert only the id inside it but I don't think that's needed.
These URIs already have the Comm keyserver hardcoded, so it will require even more changes anyway when we are adding multi keyserver support. And if in the future all uploads will be handled by blob service, this endpoint won't be even needed.

This revision is now accepted and ready to land.May 19 2023, 12:58 AM