synapse-product/synapse/handlers
David Robertson 2d91b6256e
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
2021-10-21 17:48:59 +01:00
..
ui_auth Use direct references for configuration variables (part 7). (#10959) 2021-10-04 07:18:54 -04:00
__init__.py
account_data.py
account_validity.py
admin.py Remove the deprecated BaseHandler. (#11005) 2021-10-08 07:44:43 -04:00
appservice.py Improve docstrings for methods related to sending EDUs to application services (#11138) 2021-10-21 17:42:25 +01:00
auth.py Port the Password Auth Providers module interface to the new generic interface (#10548) 2021-10-13 11:21:52 +00:00
cas.py
deactivate_account.py Revert change to counting of deactivated users towards the monthly active users limit (#11127) 2021-10-20 11:05:29 +01:00
device.py Improve docstrings for methods related to sending EDUs to application services (#11138) 2021-10-21 17:42:25 +01:00
devicemessage.py
directory.py Remove the deprecated BaseHandler. (#11005) 2021-10-08 07:44:43 -04:00
e2e_keys.py
e2e_room_keys.py
event_auth.py Check *all* auth events for room id and rejection (#11009) 2021-10-18 18:28:30 +01:00
events.py Remove the deprecated BaseHandler. (#11005) 2021-10-08 07:44:43 -04:00
federation_event.py Clean up _update_auth_events_and_context_for_auth (#11122) 2021-10-20 18:22:40 +01:00
federation.py Move _persist_auth_tree into FederationEventHandler (#11115) 2021-10-19 10:24:09 +01:00
groups_local.py
identity.py Consider IP whitelist for identity server resolution (#11120) 2021-10-20 18:43:49 +01:00
initial_sync.py Remove the deprecated BaseHandler. (#11005) 2021-10-08 07:44:43 -04:00
message.py Resolve and share state_groups for all historical events in batch (MSC2716) (#10975) 2021-10-13 17:44:00 -05:00
oidc.py
pagination.py Move experimental & retention config out of the server module. (#11070) 2021-10-15 14:30:48 +00:00
password_policy.py
presence.py Improve docstrings for methods related to sending EDUs to application services (#11138) 2021-10-21 17:42:25 +01:00
profile.py Remove the deprecated BaseHandler. (#11005) 2021-10-08 07:44:43 -04:00
read_marker.py Remove the deprecated BaseHandler. (#11005) 2021-10-08 07:44:43 -04:00
receipts.py Improve docstrings for methods related to sending EDUs to application services (#11138) 2021-10-21 17:42:25 +01:00
register.py Remove the deprecated BaseHandler. (#11005) 2021-10-08 07:44:43 -04:00
room_batch.py Resolve and share state_groups for all historical events in batch (MSC2716) (#10975) 2021-10-13 17:44:00 -05:00
room_list.py Remove the deprecated BaseHandler. (#11005) 2021-10-08 07:44:43 -04:00
room_member_worker.py
room_member.py Remove the deprecated BaseHandler. (#11005) 2021-10-08 07:44:43 -04:00
room_summary.py
room.py Add type hints to synapse.events.*. (#11066) 2021-10-13 07:24:07 -04:00
saml.py Remove the deprecated BaseHandler. (#11005) 2021-10-08 07:44:43 -04:00
search.py Remove the deprecated BaseHandler. (#11005) 2021-10-08 07:44:43 -04:00
send_email.py
set_password.py Remove the deprecated BaseHandler. (#11005) 2021-10-08 07:44:43 -04:00
sso.py Use direct references for configuration variables (part 5). (#10897) 2021-09-24 07:25:21 -04:00
state_deltas.py
stats.py
sync.py
typing.py Improve docstrings for methods related to sending EDUs to application services (#11138) 2021-10-21 17:42:25 +01:00
user_directory.py Fix adding excluded users to the private room sharing tables when joining a room (#11143) 2021-10-21 17:48:59 +01:00