mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 04:24:56 -04:00
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.
This commit is contained in:
parent
f3f0ab10fe
commit
1103c5fe8a
3 changed files with 6 additions and 5 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue