This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update the MSC3083 support to verify if joins are from an authorized server #10254
Merged
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
6a0dd93
Sign send_{join,leave,knock} requests.
clokep cb8aaed
Convert compute_auth_events to async.
clokep f9bfc19
Include another user's membership event in the auth events.
clokep fd37e76
Update the auth rules to inspect event signatures.
clokep 59de557
Only perform checks when signature checking is enabled.
clokep 2a074d3
Do not perform a local join if the local server is not authorized.
clokep d2fdc1b
Newsfragment
clokep 441a9bb
Update the room version.
clokep aab6ae3
Merge remote-tracking branch 'origin/develop' into clokep/restricted-…
clokep 111bbcf
Use get_domain_from_id.
clokep 6d7e981
Consistently default to PL 0 for invite.
clokep 80ce8f8
Include the authorising user ID in the event content.
clokep 1a8f171
Revert "Convert compute_auth_events to async."
clokep 5fbc307
Check signatures of the authorising server.
clokep fda81ad
Conditionally sign events in /send_join
clokep 13cfdd7
Review comments.
clokep 0da003c
Update the auth checks to use join_authorised_via_users_server.
clokep 2c6a34c
Do not do remote joins if the user is invited/already joined.
clokep 6b00541
Merge remote-tracking branch 'origin/develop' into clokep/restricted-…
clokep 09599a2
Fix local joins to restricted rooms & abstract code.
clokep f90db62
Merge remote-tracking branch 'origin/develop' into clokep/restricted-…
clokep 6997b6a
Check that signature exists in event auth.
clokep c71f2d6
Pull all state.
clokep 83d95a0
Sign event before verifying.
clokep 9cddd4b
Return the signed event from send_join and persist it.
clokep 789fdc1
Remove unused parameter.
clokep 6cf7890
Ensure we do not sign requests for other servers.
clokep ded8caa
Merge remote-tracking branch 'origin/develop' into clokep/restricted-…
clokep 110fb19
Do not attempt to make an event object if no event data is returned.
clokep 84d21d6
Use f-strings.
clokep 858fb10
Add comments.
clokep bca8e73
Use attrs instead of TypedDict.
clokep d8eb84e
Inline logic used once.
clokep 9f497a0
Backout unrealted change.
clokep fbe0038
Simplify logic to find user with maximum PL.
clokep b3a4b65
Only used the returned event from /send_join if the room version supp…
clokep 8b2cac2
Fix copy & paste error.
clokep 05e35ce
Raise an error if an authorising user cannot be found.
clokep a588b7b
Raise errors according to the spec.
clokep 381cc8e
Update error codes.
clokep c82c0ce
Ensure that /send_join and /make_join go to the same server.
clokep 0437602
Merge remote-tracking branch 'origin/develop' into clokep/restricted-…
clokep 3549b5e
Fix the default power-level of invite and ensure the chosen user can …
clokep 9970af8
Filter to local users.
clokep 5aa985d
Lint
clokep 8c82dcf
Fix typo.
clokep 4cb62e8
Merge remote-tracking branch 'origin/develop' into clokep/restricted-…
clokep ba070ad
Prefix the event.
clokep 549ca5b
Reduce logging level.
clokep af2c6a5
Pipe the room version into auth_types_for_event and use it.
clokep bc2677b
Move helper code closer to callers.
clokep 6bc22bb
Fix tests.
clokep File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Update support for [MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083) to consider changes in the MSC around which servers can issue join events. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure we need to do this here and in
_check_sigs_on_pdu
(since that checks the signature is valid while this just checks that a signature exists). Anyway I matched what the 3pid code did.