mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 07:54:48 -04:00
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.
This commit is contained in:
parent
e9f2ad8603
commit
0bd968921c
3 changed files with 100 additions and 3 deletions
|
@ -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 = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue