summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-08-01 15:35:29 +0100
committerRichard van der Hoff <richard@matrix.org>2018-08-03 16:08:32 +0100
commit3777fa26aaf36245168980054c4eebf96169dd13 (patch)
tree8cba659f0ad38980f881e28e8c2acf85ba924f18 /synapse
parentEnforce compatibility when processing make_join requests (diff)
downloadsynapse-3777fa26aaf36245168980054c4eebf96169dd13.tar.xz
sanity check response from make_join
Diffstat (limited to 'synapse')
-rw-r--r--synapse/federation/federation_client.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py
index 7550e11b6e..de4b813a15 100644
--- a/synapse/federation/federation_client.py
+++ b/synapse/federation/federation_client.py
@@ -561,7 +561,9 @@ class FederationClient(FederationBase):
                 destination, room_id, user_id, membership
             )
 
-            pdu_dict = ret["event"]
+            pdu_dict = ret.get("event", None)
+            if not isinstance(pdu_dict, dict):
+                raise InvalidResponseError("Bad 'event' field in response")
 
             logger.debug("Got response to make_%s: %s", membership, pdu_dict)