summary refs log tree commit diff
path: root/changelog.d/11143.misc
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2021-10-21 17:48:59 +0100
committerGitHub <noreply@github.com>2021-10-21 17:48:59 +0100
commit2d91b6256e53a9e60027880b0407bd77cb653ad1 (patch)
treefe4817b30927785da43bfce80cefda17f5360b3a /changelog.d/11143.misc
parentImprove docstrings for methods related to sending EDUs to application service... (diff)
downloadsynapse-2d91b6256e53a9e60027880b0407bd77cb653ad1.tar.xz
Fix adding excluded users to the private room sharing tables when joining a room (#11143)
* We only need to fetch users in private rooms

* Filter out `user_id` at the top

* Discard excluded users in the top loop

We weren't doing this in the "First, if they're our user" branch so this
is a bugfix.

* The caller must check that `user_id` is included

This is in the docstring. There are two call sites:
- one in `_handle_room_publicity_change`, which explicitly checks before calling;
- and another in `_handle_room_membership_event`, which returns early if
  the user is excluded.

So this change is safe.

* Test joining a private room with an excluded user

* Tweak an existing test

* Changelog

* test docstring

* lint
Diffstat (limited to 'changelog.d/11143.misc')
-rw-r--r--changelog.d/11143.misc1
1 files changed, 1 insertions, 0 deletions
diff --git a/changelog.d/11143.misc b/changelog.d/11143.misc
new file mode 100644
index 0000000000..496e44a9c0
--- /dev/null
+++ b/changelog.d/11143.misc
@@ -0,0 +1 @@
+Fix a long-standing bug where users excluded from the directory could still be added to the `users_who_share_private_rooms` table after a regular user joins a private room.
\ No newline at end of file