Skip to content
Snippets Groups Projects
Commit ab9e0180 authored by Erik Johnston's avatar Erik Johnston
Browse files

Check room exists when authenticating an event, by asserting they reference a creation event

parent 236245f7
No related branches found
No related tags found
No related merge requests found
......@@ -65,6 +65,14 @@ class Auth(object):
# FIXME
return True
creation_event = auth_events.get((EventTypes.Create, ""), None)
if not creation_event:
raise SynapseError(
400,
"Room %r does not exist" % (event.room_id,)
)
# FIXME: Temp hack
if event.type == EventTypes.Aliases:
return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment