summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-07-18 13:38:05 +0200
committerGitHub <noreply@github.com>2019-07-18 13:38:05 +0200
commit4dc2eda1d34b142035e5cb2a93e27272dce84c03 (patch)
treed66b433595254eb665e1327d5116c66bfa697560
parentMerge pull request #5646 from matrix-org/babolivier/profile-allow-self (diff)
parentFix changelog (diff)
downloadsynapse-4dc2eda1d34b142035e5cb2a93e27272dce84c03.tar.xz
Merge pull request #5702 from matrix-org/babolivier/3pid-invite dinsic_2019-07-18
Fix check of the association between a 3PID invite and the subsequent m.room.member event in the 3rd party rules
-rw-r--r--changelog.d/5702.bugfix1
-rw-r--r--synapse/third_party_rules/access_rules.py5
2 files changed, 5 insertions, 1 deletions
diff --git a/changelog.d/5702.bugfix b/changelog.d/5702.bugfix
new file mode 100644

index 0000000000..43b6e39b13 --- /dev/null +++ b/changelog.d/5702.bugfix
@@ -0,0 +1 @@ +Fix 3PID invite to invite association detection in the Tchap room access rules. diff --git a/synapse/third_party_rules/access_rules.py b/synapse/third_party_rules/access_rules.py
index c8698c66cc..e3f97bdf3a 100644 --- a/synapse/third_party_rules/access_rules.py +++ b/synapse/third_party_rules/access_rules.py
@@ -454,5 +454,8 @@ class RoomAccessRules(object): invite (EventBase): The m.room.member event with "invite" membership. threepid_invite_token (str): The state key from the 3PID invite. """ - token = invite.content.get("third_party_signed", {}).get("token", "") + token = invite.content.get( + "third_party_invite", {}, + ).get("signed", {}).get("token", "") + return token == threepid_invite_token