mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 14:24:58 -04:00
Don't set new room alias before potential 403 (#10930)
Fixes: #10929 Signed-off-by: Andrew Ferrazzutti <fair@miscworks.net>
This commit is contained in:
parent
da957a60e8
commit
4387b791e0
4 changed files with 113 additions and 12 deletions
|
@ -145,7 +145,7 @@ class DirectoryHandler:
|
|||
if not self.config.roomdirectory.is_alias_creation_allowed(
|
||||
user_id, room_id, room_alias_str
|
||||
):
|
||||
# Lets just return a generic message, as there may be all sorts of
|
||||
# Let's just return a generic message, as there may be all sorts of
|
||||
# reasons why we said no. TODO: Allow configurable error messages
|
||||
# per alias creation rule?
|
||||
raise SynapseError(403, "Not allowed to create alias")
|
||||
|
@ -461,7 +461,7 @@ class DirectoryHandler:
|
|||
if not self.config.roomdirectory.is_publishing_room_allowed(
|
||||
user_id, room_id, room_aliases
|
||||
):
|
||||
# Lets just return a generic message, as there may be all sorts of
|
||||
# Let's just return a generic message, as there may be all sorts of
|
||||
# reasons why we said no. TODO: Allow configurable error messages
|
||||
# per alias creation rule?
|
||||
raise SynapseError(403, "Not allowed to publish room")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue