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
|
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 |
|
0 | 9 |
Synapse 1.35.0 (2021-06-01)
|
1 | 10 |
===========================
|
2 | 11 |
|
46 | 46 |
except ImportError:
|
47 | 47 |
pass
|
48 | 48 |
|
49 | |
__version__ = "1.35.0"
|
|
49 |
__version__ = "1.35.1"
|
50 | 50 |
|
51 | 51 |
if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
|
52 | 52 |
# We import here so that we don't have to install a bunch of deps when
|
25 | 25 |
HistoryVisibility,
|
26 | 26 |
Membership,
|
27 | 27 |
)
|
28 | |
from synapse.api.errors import AuthError
|
29 | 28 |
from synapse.events import EventBase
|
30 | 29 |
from synapse.events.utils import format_event_for_client_v2
|
31 | 30 |
from synapse.types import JsonDict
|
|
455 | 454 |
return True
|
456 | 455 |
|
457 | 456 |
# 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
|
468 | 467 |
|
469 | 468 |
# If this is a request over federation, check if the host is in the room or
|
470 | 469 |
# is in one of the spaces specified via the join rules.
|