mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 19:44:15 -04:00
Prevent message search in upgraded rooms we're not in (#6385)
This commit is contained in:
parent
54ae52ba96
commit
ea0f0ad414
4 changed files with 41 additions and 16 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue