summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-06-18 13:41:33 -0400
committerGitHub <noreply@github.com>2021-06-18 18:41:33 +0100
commit0bd968921c03dd61c1487f85dd884c4ed11ff486 (patch)
tree298d2d2b8812426792aa596242825ff049769189 /synapse/handlers
parentDescribe callbacks signatures as async in new modules doc (#10206) (diff)
downloadsynapse-0bd968921c03dd61c1487f85dd884c4ed11ff486.tar.xz
Fix a missing await when in the spaces summary. (#10208)
This could cause a minor data leak if someone defined a non-restricted join rule
with an allow key or used a restricted join rule in an older room version, but this is
unlikely.

Additionally this starts adding unit tests to the spaces summary handler.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/space_summary.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/handlers/space_summary.py b/synapse/handlers/space_summary.py

index e953a8afe6..17fc47ce16 100644 --- a/synapse/handlers/space_summary.py +++ b/synapse/handlers/space_summary.py
@@ -445,14 +445,13 @@ class SpaceSummaryHandler: member_event_id = state_ids.get((EventTypes.Member, requester), None) # If they're in the room they can see info on it. - member_event = None if member_event_id: member_event = await self._store.get_event(member_event_id) if member_event.membership in (Membership.JOIN, Membership.INVITE): return True # Otherwise, check if they should be allowed access via membership in a space. - if self._event_auth_handler.has_restricted_join_rules( + if await self._event_auth_handler.has_restricted_join_rules( state_ids, room_version ): allowed_rooms = (