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

Commit

Permalink
Merge tag 'v1.35.1' into babolivier/dinsic_1.41.0
Browse files Browse the repository at this point in the history
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))
  • Loading branch information
babolivier committed Aug 31, 2021
2 parents 200ee12 + 5666773 commit 5a33232
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
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](https://github.com/matrix-org/synapse/issues/10109))


Synapse 1.35.0 (2021-06-01)
===========================

Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
matrix-synapse-py3 (1.35.1) stable; urgency=medium

* New synapse release 1.35.1.

-- Synapse Packaging team <[email protected]> Thu, 03 Jun 2021 08:11:29 -0400

matrix-synapse-py3 (1.35.0) stable; urgency=medium

* New synapse release 1.35.0.
Expand Down
2 changes: 1 addition & 1 deletion synapse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
except ImportError:
pass

__version__ = "1.35.0"
__version__ = "1.35.1"

if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
# We import here so that we don't have to install a bunch of deps when
Expand Down
19 changes: 9 additions & 10 deletions synapse/handlers/space_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
HistoryVisibility,
Membership,
)
from synapse.api.errors import AuthError
from synapse.events import EventBase
from synapse.events.utils import format_event_for_client_v2
from synapse.types import JsonDict
Expand Down Expand Up @@ -456,16 +455,16 @@ async def _is_room_accessible(
return True

# Otherwise, check if they should be allowed access via membership in a space.
try:
await self._event_auth_handler.check_restricted_join_rules(
state_ids, room_version, requester, member_event
if self._event_auth_handler.has_restricted_join_rules(
state_ids, room_version
):
allowed_spaces = (
await self._event_auth_handler.get_spaces_that_allow_join(state_ids)
)
except AuthError:
# The user doesn't have access due to spaces, but might have access
# another way. Keep trying.
pass
else:
return True
if await self._event_auth_handler.is_user_in_rooms(
allowed_spaces, requester
):
return True

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

0 comments on commit 5a33232

Please sign in to comment.