Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 7bd595d

Browse files
committed
Modify the behavior of how bad data is handled to fail closed.
1 parent 04fdfe5 commit 7bd595d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

synapse/handlers/room_member.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,10 @@ async def _can_join_without_invite(
210210
if join_rules_event.content.get("join_rule") != JoinRules.MSC3083_RESTRICTED:
211211
return True
212212

213-
# If allowed is of the wrong form, then ignore it (and treat the room as public).
213+
# If allowed is of the wrong form, then only allows invites.
214214
allowed_spaces = join_rules_event.content.get("allow", [])
215215
if not isinstance(allowed_spaces, list):
216-
return True
216+
return False
217217

218218
# Get the list of joined rooms and see if there's an overlap.
219219
joined_rooms = await self.store.get_rooms_for_user(user_id)

0 commit comments

Comments
 (0)