Page MenuHomePhabricator

[keyserver] Create an endpoint returning primary invite links
ClosedPublic

Authored by tomek on May 5 2023, 8:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 2:55 AM
Unknown Object (File)
Tue, Apr 16, 12:08 AM
Unknown Object (File)
Mon, Apr 15, 3:55 PM
Unknown Object (File)
Mon, Apr 15, 10:57 AM
Unknown Object (File)
Sun, Apr 14, 6:58 AM
Unknown Object (File)
Sat, Apr 13, 3:55 PM
Unknown Object (File)
Sat, Apr 13, 12:42 PM
Unknown Object (File)
Thu, Apr 11, 4:12 PM
Subscribers

Details

Summary

This endpoint will be used to display exiting link. In near future we will need an endpoint that returns all the links - it will reuse most of the logic from this endpoint.

Test Plan

Call the endpoint and check if all the primary links were returned.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.May 5 2023, 8:51 AM
Harbormaster failed remote builds in B19070: Diff 26118!

Fix flow issue - move endpoint update from the next diff

tomek requested review of this revision.May 8 2023, 3:28 AM
kamil requested changes to this revision.May 9 2023, 1:24 AM

I think this is a bit vulnerable, we fetch all the links to the client - which means if the user is not part of a given community can get possession of the invite link and join the community when I think only members of the community should invite others. Fetching invite links to communities in which the user is a part will help.

Not a huge deal but I think worth improving.

This revision now requires changes to proceed.May 9 2023, 1:24 AM

Return only the invitations where a user is a member. Tested this by creating a new
community with a primary link - the endpoint doesn't return its link.

In D7726#229991, @kamil wrote:

I think this is a bit vulnerable, we fetch all the links to the client - which means if the user is not part of a given community can get possession of the invite link and join the community when I think only members of the community should invite others. Fetching invite links to communities in which the user is a part will help.

Not a huge deal but I think worth improving.

That's a valid point! Update the diff.

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