Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 5a33232

Browse files
committed
Merge tag 'v1.35.1' into babolivier/dinsic_1.41.0
Synapse 1.35.1 (2021-06-03) =========================== Bugfixes -------- - 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](matrix-org/synapse#10109))
2 parents 200ee12 + 5666773 commit 5a33232

File tree

4 files changed

+25
-11
lines changed

4 files changed

+25
-11
lines changed

CHANGES.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Synapse 1.35.1 (2021-06-03)
2+
===========================
3+
4+
Bugfixes
5+
--------
6+
7+
- 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))
8+
9+
110
Synapse 1.35.0 (2021-06-01)
211
===========================
312

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
matrix-synapse-py3 (1.35.1) stable; urgency=medium
2+
3+
* New synapse release 1.35.1.
4+
5+
-- Synapse Packaging team <[email protected]> Thu, 03 Jun 2021 08:11:29 -0400
6+
17
matrix-synapse-py3 (1.35.0) stable; urgency=medium
28

39
* New synapse release 1.35.0.

synapse/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
except ImportError:
4848
pass
4949

50-
__version__ = "1.35.0"
50+
__version__ = "1.35.1"
5151

5252
if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
5353
# We import here so that we don't have to install a bunch of deps when

synapse/handlers/space_summary.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
HistoryVisibility,
2727
Membership,
2828
)
29-
from synapse.api.errors import AuthError
3029
from synapse.events import EventBase
3130
from synapse.events.utils import format_event_for_client_v2
3231
from synapse.types import JsonDict
@@ -456,16 +455,16 @@ async def _is_room_accessible(
456455
return True
457456

458457
# Otherwise, check if they should be allowed access via membership in a space.
459-
try:
460-
await self._event_auth_handler.check_restricted_join_rules(
461-
state_ids, room_version, requester, member_event
458+
if self._event_auth_handler.has_restricted_join_rules(
459+
state_ids, room_version
460+
):
461+
allowed_spaces = (
462+
await self._event_auth_handler.get_spaces_that_allow_join(state_ids)
462463
)
463-
except AuthError:
464-
# The user doesn't have access due to spaces, but might have access
465-
# another way. Keep trying.
466-
pass
467-
else:
468-
return True
464+
if await self._event_auth_handler.is_user_in_rooms(
465+
allowed_spaces, requester
466+
):
467+
return True
469468

470469
# If this is a request over federation, check if the host is in the room or
471470
# is in one of the spaces specified via the join rules.

0 commit comments

Comments
 (0)