Codebase list matrix-synapse / 758ded4
Update upstream source from tag 'upstream/1.35.1' Update to upstream version '1.35.1' with Debian dir 5e9cfa7f3a556b993532d618eea1079ffff48163 Andrej Shadura 2 years ago
3 changed file(s) with 20 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
0 Synapse 1.35.1 (2021-06-03)
1 ===========================
2
3 Bugfixes
4 --------
5
6 - Fix a bug introduced in v1.35.0 where invite-only rooms would be shown to all users in a space, regardless of if the user had access to it. ([\#10109](https://github.com/matrix-org/synapse/issues/10109))
7
8
09 Synapse 1.35.0 (2021-06-01)
110 ===========================
211
4646 except ImportError:
4747 pass
4848
49 __version__ = "1.35.0"
49 __version__ = "1.35.1"
5050
5151 if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
5252 # We import here so that we don't have to install a bunch of deps when
2525 HistoryVisibility,
2626 Membership,
2727 )
28 from synapse.api.errors import AuthError
2928 from synapse.events import EventBase
3029 from synapse.events.utils import format_event_for_client_v2
3130 from synapse.types import JsonDict
455454 return True
456455
457456 # Otherwise, check if they should be allowed access via membership in a space.
458 try:
459 await self._event_auth_handler.check_restricted_join_rules(
460 state_ids, room_version, requester, member_event
461 )
462 except AuthError:
463 # The user doesn't have access due to spaces, but might have access
464 # another way. Keep trying.
465 pass
466 else:
467 return True
457 if self._event_auth_handler.has_restricted_join_rules(
458 state_ids, room_version
459 ):
460 allowed_spaces = (
461 await self._event_auth_handler.get_spaces_that_allow_join(state_ids)
462 )
463 if await self._event_auth_handler.is_user_in_rooms(
464 allowed_spaces, requester
465 ):
466 return True
468467
469468 # If this is a request over federation, check if the host is in the room or
470469 # is in one of the spaces specified via the join rules.