diff options
author | reivilibre <oliverw@matrix.org> | 2024-01-08 17:24:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-08 17:24:20 +0000 |
commit | a83a337c4dd908db82ed555e8340ee3b52f34e9e (patch) | |
tree | 0df9de93a9ad38e44711ef2e87d8b713da154a0f /synapse/federation | |
parent | Port `EventInternalMetadata` class to Rust (#16782) (diff) | |
download | synapse-a83a337c4dd908db82ed555e8340ee3b52f34e9e.tar.xz |
Filter out rooms from the room directory being served to other homeservers when those rooms block that homeserver by their Access Control Lists. (#16759)
The idea here being that the directory server shouldn't advertise rooms to a requesting server is the requesting server would not be allowed to join or participate in the room. <!-- Fixes: # <!-- --> <!-- Supersedes: # <!-- --> <!-- Follows: # <!-- --> <!-- Part of: # <!-- --> Base: `develop` <!-- git-stack-base-branch:develop --> <!-- This pull request is commit-by-commit review friendly. <!-- --> <!-- This pull request is intended for commit-by-commit review. <!-- --> Original commit schedule, with full messages: <ol> <li> Pass `from_federation_origin` down into room list retrieval code </li> <li> Don't cache /publicRooms response for inbound federated requests </li> <li> fixup! Don't cache /publicRooms response for inbound federated requests </li> <li> Cap the number of /publicRooms entries to 100 </li> <li> Simplify code now that you can't request unlimited rooms </li> <li> Filter out rooms from federated requests that don't have the correct ACL </li> <li> Request a handful more when filtering ACLs so that we can try to avoid shortchanging the requester </li> </ol> --------- Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
Diffstat (limited to 'synapse/federation')
-rw-r--r-- | synapse/federation/transport/server/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/federation/transport/server/__init__.py b/synapse/federation/transport/server/__init__.py index 839092e4d3..74391e3cb2 100644 --- a/synapse/federation/transport/server/__init__.py +++ b/synapse/federation/transport/server/__init__.py @@ -154,7 +154,10 @@ class PublicRoomList(BaseFederationServlet): limit = None data = await self.handler.get_local_public_room_list( - limit, since_token, network_tuple=network_tuple, from_federation=True + limit, + since_token, + network_tuple=network_tuple, + from_federation_origin=origin, ) return 200, data @@ -195,7 +198,7 @@ class PublicRoomList(BaseFederationServlet): since_token=since_token, search_filter=search_filter, network_tuple=network_tuple, - from_federation=True, + from_federation_origin=origin, ) return 200, data |