diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-08-01 15:35:29 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-08-03 16:08:32 +0100 |
commit | 3777fa26aaf36245168980054c4eebf96169dd13 (patch) | |
tree | 8cba659f0ad38980f881e28e8c2acf85ba924f18 | |
parent | Enforce compatibility when processing make_join requests (diff) | |
download | synapse-3777fa26aaf36245168980054c4eebf96169dd13.tar.xz |
sanity check response from make_join
-rw-r--r-- | synapse/federation/federation_client.py | 4 |
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) |