diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2019-12-11 13:07:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-11 13:07:25 +0000 |
commit | ea0f0ad4144e3ce0cf10f3ec461ecd8f654955a2 (patch) | |
tree | 42887f20e171923facb8ddf3098f1a7f310ec52a /synapse/handlers/federation.py | |
parent | Merge pull request #6349 from matrix-org/babolivier/msc1802 (diff) | |
download | synapse-ea0f0ad4144e3ce0cf10f3ec461ecd8f654955a2.tar.xz |
Prevent message search in upgraded rooms we're not in (#6385)
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index c0dcf9abf8..13865c470c 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -1299,7 +1299,7 @@ class FederationHandler(BaseHandler): # Check whether this room is the result of an upgrade of a room we already know # about. If so, migrate over user information predecessor = yield self.store.get_room_predecessor(room_id) - if not predecessor: + if not predecessor or not isinstance(predecessor.get("room_id"), str): return old_room_id = predecessor["room_id"] logger.debug( @@ -1542,7 +1542,7 @@ class FederationHandler(BaseHandler): @defer.inlineCallbacks def do_remotely_reject_invite(self, target_hosts, room_id, user_id, content): origin, event, event_format_version = yield self._make_and_verify_event( - target_hosts, room_id, user_id, "leave", content=content, + target_hosts, room_id, user_id, "leave", content=content ) # Mark as outlier as we don't have any state for this event; we're not # even in the room. |