mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:06:08 -04:00
Check for space membership during a remote join of a restricted room. (#9763)
When receiving a /send_join request for a room with join rules set to 'restricted', check if the user is a member of the spaces defined in the 'allow' key of the join rules. This only applies to an experimental room version, as defined in MSC3083.
This commit is contained in:
parent
05e8c70c05
commit
cc51aaaa7a
7 changed files with 238 additions and 131 deletions
|
@ -75,8 +75,10 @@ class MessageAcceptTests(unittest.HomeserverTestCase):
|
|||
)
|
||||
|
||||
self.handler = self.homeserver.get_federation_handler()
|
||||
self.handler.do_auth = lambda origin, event, context, auth_events: succeed(
|
||||
context
|
||||
self.handler._check_event_auth = (
|
||||
lambda origin, event, context, state, auth_events, backfilled: succeed(
|
||||
context
|
||||
)
|
||||
)
|
||||
self.client = self.homeserver.get_federation_client()
|
||||
self.client._check_sigs_and_hash_and_fetch = lambda dest, pdus, **k: succeed(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue