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

Commit c3ccad7

Browse files
authored
Only do restricted join rules signature checks for room versions 8/9. (#10927)
Otherwise the presence of a (bogus, unused) field could cause auth checks to fail.
1 parent a8bbf08 commit c3ccad7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

changelog.d/10927.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a bug introduced in Synapse v1.40.0 where the signature checks for room version 8/9 could be applied to earlier room versions in some situations.

synapse/event_auth.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ def check(
113113
raise AuthError(403, "Event not signed by sending server")
114114

115115
is_invite_via_allow_rule = (
116-
event.type == EventTypes.Member
116+
room_version_obj.msc3083_join_rules
117+
and event.type == EventTypes.Member
117118
and event.membership == Membership.JOIN
118119
and "join_authorised_via_users_server" in event.content
119120
)

0 commit comments

Comments
 (0)