mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-20 20:04:17 -05:00
Avoid mutating cached room aliases. (#15038)
This might cause incorrect data in other callers which are not expecting the canonical alias to be added into the response.
This commit is contained in:
parent
733531ee3e
commit
8a6e043488
1
changelog.d/15038.bugfix
Normal file
1
changelog.d/15038.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fix a long-standing bug where the room aliases returned could be corrupted.
|
@ -485,7 +485,8 @@ class DirectoryHandler:
|
||||
)
|
||||
)
|
||||
if canonical_alias:
|
||||
room_aliases.append(canonical_alias)
|
||||
# Ensure we do not mutate room_aliases.
|
||||
room_aliases = room_aliases + [canonical_alias]
|
||||
|
||||
if not self.config.roomdirectory.is_publishing_room_allowed(
|
||||
user_id, room_id, room_aliases
|
||||
|
Loading…
Reference in New Issue
Block a user