0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 11:53:53 +01:00

Also check the domains for membership state_keys

This commit is contained in:
Erik Johnston 2015-09-01 16:17:25 +01:00
parent 187320b019
commit 9b05ef6f39

View file

@ -190,6 +190,15 @@ class Auth(object):
target_user_id = event.state_key
creating_domain = RoomID.from_string(event.room_id).domain
target_domain = UserID.from_string(target_user_id).domain
if creating_domain != target_domain:
if not self.can_federate(event, auth_events):
raise AuthError(
403,
"This room has been marked as unfederatable."
)
# get info about the caller
key = (EventTypes.Member, event.user_id, )
caller = auth_events.get(key)