summary refs log tree commit diff
path: root/synapse/handlers/federation.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-01-24 18:31:23 +0000
committerErik Johnston <erik@matrix.org>2019-01-24 18:31:23 +0000
commitd148c43050f7a85523a743ff6069683c644a517d (patch)
tree4a87175747cbca6b310e5ad83b8ee18d7dbd7700 /synapse/handlers/federation.py
parentNewsfile (diff)
downloadsynapse-d148c43050f7a85523a743ff6069683c644a517d.tar.xz
Review comments
Diffstat (limited to '')
-rw-r--r--synapse/handlers/federation.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index a9dc4a4e4e..5280d88a50 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -1664,6 +1664,11 @@ class FederationHandler(BaseHandler):
                 create_event = e
                 break
 
+        if create_event is None:
+            # If the state doesn't have a create event then the room is
+            # invalid, and it would fail auth checks anyway.
+            raise SynapseError(400, "No create event in state")
+
         room_version = create_event.content.get("room_version", RoomVersions.V1)
 
         missing_auth_events = set()