mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:06:08 -04:00
Merge pull request #265 from matrix-org/erikj/check_room_exists
Check room exists when authenticating an event
This commit is contained in:
commit
91cb3b630d
2 changed files with 37 additions and 8 deletions
|
@ -65,6 +65,14 @@ class Auth(object):
|
|||
# FIXME
|
||||
return True
|
||||
|
||||
creation_event = auth_events.get((EventTypes.Create, ""), None)
|
||||
|
||||
if not creation_event:
|
||||
raise SynapseError(
|
||||
403,
|
||||
"Room %r does not exist" % (event.room_id,)
|
||||
)
|
||||
|
||||
# FIXME: Temp hack
|
||||
if event.type == EventTypes.Aliases:
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue