diff options
author | Sean Quah <8349537+squahtx@users.noreply.github.com> | 2021-11-16 15:40:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-16 15:40:47 +0000 |
commit | 88375beeaab3f3902d6f22fea6a14daa8f2b8a5a (patch) | |
tree | 7ddd72ce28d22462371e77e2e18a3db9fd497cbf /synapse/handlers/room_summary.py | |
parent | Add support for `/_matrix/client/v3` APIs (#11318) (diff) | |
download | synapse-88375beeaab3f3902d6f22fea6a14daa8f2b8a5a.tar.xz |
Avoid sharing room hierarchy responses between users (#11355)
Different users may be allowed to see different rooms within a space, so sharing responses between users is inadvisable.
Diffstat (limited to 'synapse/handlers/room_summary.py')
-rw-r--r-- | synapse/handlers/room_summary.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/synapse/handlers/room_summary.py b/synapse/handlers/room_summary.py index fb26ee7ad7..8181cc0b52 100644 --- a/synapse/handlers/room_summary.py +++ b/synapse/handlers/room_summary.py @@ -97,7 +97,7 @@ class RoomSummaryHandler: # If a user tries to fetch the same page multiple times in quick succession, # only process the first attempt and return its result to subsequent requests. self._pagination_response_cache: ResponseCache[ - Tuple[str, bool, Optional[int], Optional[int], Optional[str]] + Tuple[str, str, bool, Optional[int], Optional[int], Optional[str]] ] = ResponseCache( hs.get_clock(), "get_room_hierarchy", @@ -282,7 +282,14 @@ class RoomSummaryHandler: # This is due to the pagination process mutating internal state, attempting # to process multiple requests for the same page will result in errors. return await self._pagination_response_cache.wrap( - (requested_room_id, suggested_only, max_depth, limit, from_token), + ( + requester, + requested_room_id, + suggested_only, + max_depth, + limit, + from_token, + ), self._get_room_hierarchy, requester, requested_room_id, |