summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-03-08 08:09:11 -0500
committerGitHub <noreply@github.com>2022-03-08 08:09:11 -0500
commitca9234a9eba4fba02d8d50e5d5eff079bfaf0ebd (patch)
tree7c72f823a7cb73fa06166cff9888ff590e354994 /tests
parentFix incorrect type hints for txredis. (#12042) (diff)
downloadsynapse-ca9234a9eba4fba02d8d50e5d5eff079bfaf0ebd.tar.xz
Do not return allowed_room_ids from /hierarchy response. (#12175)
This field is only to be used in the Server-Server API, and not the
Client-Server API, but was being leaked when a federation response
was used in the /hierarchy API.
Diffstat (limited to 'tests')
-rw-r--r--tests/handlers/test_room_summary.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/handlers/test_room_summary.py b/tests/handlers/test_room_summary.py
index cff07a8973..d37292ce13 100644
--- a/tests/handlers/test_room_summary.py
+++ b/tests/handlers/test_room_summary.py
@@ -172,6 +172,9 @@ class SpaceSummaryTestCase(unittest.HomeserverTestCase):
         result_room_ids = []
         result_children_ids = []
         for result_room in result["rooms"]:
+            # Ensure federation results are not leaking over the client-server API.
+            self.assertNotIn("allowed_room_ids", result_room)
+
             result_room_ids.append(result_room["room_id"])
             result_children_ids.append(
                 [