mirror of
https://github.com/element-hq/synapse
synced 2024-08-19 19:40:20 +00:00
Also check if server is in the room
This commit is contained in:
parent
ea8c4094db
commit
739ea29d1e
1 changed files with 7 additions and 2 deletions
|
@ -1106,11 +1106,16 @@ class FederationHandler(BaseHandler):
|
|||
)
|
||||
|
||||
if do_auth:
|
||||
in_room = yield self.auth.check_host_in_room(
|
||||
event.room_id,
|
||||
origin
|
||||
)
|
||||
if not in_room:
|
||||
raise AuthError(403, "Host not in room.")
|
||||
|
||||
events = yield self._filter_events_for_server(
|
||||
origin, event.room_id, [event]
|
||||
)
|
||||
if not events:
|
||||
raise AuthError(403, "Host not in room.")
|
||||
|
||||
event = events[0]
|
||||
|
||||
|
|
Loading…
Reference in a new issue