Skip to content

Commit 0f9eadd

Browse files
authored
Fix knock->leave transition in auth rules (matrix-org#3694)
* Fix knock->leave transition in auth rules This was an oversight from knocking being added. For safety, this has been verified as at least intended by Synapse to work: https://github.com/matrix-org/synapse/blob/f5e2cde3f50c7315d4d7a69e814deb9593943318/synapse/event_auth.py#L390-L391 * changelog
1 parent 2cd2a71 commit 0f9eadd

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix auth rules to allow membership of `knock` -> `leave` in v7, v8, and v9.

content/rooms/fragments/v8-auth-rules.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ The rules are as follows:
9191
5. Otherwise, reject.
9292
5. If `membership` is `leave`:
9393
1. If the `sender` matches `state_key`, allow if and only if
94-
that user's current membership state is `invite` or `join`.
94+
that user's current membership state is `invite`, `join`,
95+
or `knock`.
9596
2. If the `sender`'s current membership state is not `join`,
9697
reject.
9798
3. If the *target user*'s current membership state is `ban`,

content/rooms/v7.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ The rules are as follows:
114114
5. Otherwise, reject.
115115
4. If `membership` is `leave`:
116116
1. If the `sender` matches `state_key`, allow if and only if
117-
that user's current membership state is `invite` or `join`.
117+
that user's current membership state is `invite`, `join`,
118+
or `knock`.
118119
2. If the `sender`'s current membership state is not `join`,
119120
reject.
120121
3. If the *target user*'s current membership state is `ban`,

0 commit comments

Comments
 (0)