mirror of
https://github.com/element-hq/synapse.git
synced 2025-04-08 15:24:00 +00:00
Merge fc10b29014
into 3c188231c7
This commit is contained in:
commit
51cc2e23ec
3 changed files with 6 additions and 3 deletions
1
changelog.d/18066.bugfix
Normal file
1
changelog.d/18066.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fixed a bug that caused new space-visible rooms to be hidden from the space hierarchy when any server modules are loaded.
|
|
@ -21,6 +21,8 @@
|
|||
import logging
|
||||
from typing import TYPE_CHECKING, List, Mapping, Optional, Union
|
||||
|
||||
from immutabledict import immutabledict
|
||||
|
||||
from synapse import event_auth
|
||||
from synapse.api.constants import (
|
||||
EventTypes,
|
||||
|
@ -326,13 +328,13 @@ class EventAuthHandler:
|
|||
|
||||
# If allowed is of the wrong form, then only allow invited users.
|
||||
allow_list = join_rules_event.content.get("allow", [])
|
||||
if not isinstance(allow_list, list):
|
||||
if not isinstance(allow_list, (list, tuple)):
|
||||
return ()
|
||||
|
||||
# Pull out the other room IDs, invalid data gets filtered.
|
||||
result = []
|
||||
for allow in allow_list:
|
||||
if not isinstance(allow, dict):
|
||||
if not isinstance(allow, (dict, immutabledict)):
|
||||
continue
|
||||
|
||||
# If the type is unexpected, skip it.
|
||||
|
|
|
@ -955,7 +955,7 @@ class _RoomEntry:
|
|||
|
||||
def _has_valid_via(e: EventBase) -> bool:
|
||||
via = e.content.get("via")
|
||||
if not via or not isinstance(via, list):
|
||||
if not via or not isinstance(via, (list, tuple)):
|
||||
return False
|
||||
for v in via:
|
||||
if not isinstance(v, str):
|
||||
|
|
Loading…
Add table
Reference in a new issue