summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-03-02 08:18:51 -0500
committerGitHub <noreply@github.com>2022-03-02 13:18:51 +0000
commit1103c5fe8a795eafc4aeedc547faa1b68d5a12f5 (patch)
tree5aa84e6e6b6e8315e9df0f8acd16120a976bef8b /synapse/handlers
parentMove scripts directory inside synapse, exposing as setuptools entry_points (#... (diff)
downloadsynapse-1103c5fe8a795eafc4aeedc547faa1b68d5a12f5.tar.xz
Check if instances are lists, not sequences. (#12128)
As a str is a sequence, the checks were not granular
enough and would allow lists or strings, when only
lists were valid.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/room_summary.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/handlers/room_summary.py b/synapse/handlers/room_summary.py
index 55c2cbdba8..3979cbba71 100644
--- a/synapse/handlers/room_summary.py
+++ b/synapse/handlers/room_summary.py
@@ -857,7 +857,7 @@ class _RoomEntry:
 
 def _has_valid_via(e: EventBase) -> bool:
     via = e.content.get("via")
-    if not via or not isinstance(via, Sequence):
+    if not via or not isinstance(via, list):
         return False
     for v in via:
         if not isinstance(v, str):