From 9b0bd0917dfef5d68ef36d1950e5836a99d25c84 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 22 Feb 2022 20:08:44 +0200 Subject: [PATCH] Fix join membership auth rules when `join_rule` is knock (#3737) Fixes #3736 --- changelogs/room_versions/newsfragments/3737.clarification | 1 + content/rooms/fragments/v8-auth-rules.md | 4 ++-- content/rooms/v7.md | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 changelogs/room_versions/newsfragments/3737.clarification diff --git a/changelogs/room_versions/newsfragments/3737.clarification b/changelogs/room_versions/newsfragments/3737.clarification new file mode 100644 index 00000000..c3b51679 --- /dev/null +++ b/changelogs/room_versions/newsfragments/3737.clarification @@ -0,0 +1 @@ +Fix join membership auth rules when `join_rule` is `knock`. diff --git a/content/rooms/fragments/v8-auth-rules.md b/content/rooms/fragments/v8-auth-rules.md index 67fb1aae..4b14762d 100644 --- a/content/rooms/fragments/v8-auth-rules.md +++ b/content/rooms/fragments/v8-auth-rules.md @@ -53,8 +53,8 @@ The rules are as follows: `state_key` is the creator, allow. 2. If the `sender` does not match `state_key`, reject. 3. If the `sender` is banned, reject. - 4. If the `join_rule` is `invite` then allow if membership - state is `invite` or `join`. + 4. If the `join_rule` is `invite` or `knock` then allow if + membership state is `invite` or `join`. 5. If the `join_rule` is `restricted`: 1. If membership state is `join` or `invite`, allow. 2. If the `join_authorised_via_users_server` key in `content` diff --git a/content/rooms/v7.md b/content/rooms/v7.md index 424ad739..07e09238 100644 --- a/content/rooms/v7.md +++ b/content/rooms/v7.md @@ -82,8 +82,8 @@ The rules are as follows: `state_key` is the creator, allow. 2. If the `sender` does not match `state_key`, reject. 3. If the `sender` is banned, reject. - 4. If the `join_rule` is `invite` then allow if membership - state is `invite` or `join`. + 4. If the `join_rule` is `invite` or `knock` then allow if + membership state is `invite` or `join`. 5. If the `join_rule` is `public`, allow. 6. Otherwise, reject. 3. If `membership` is `invite`: