mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2026-03-30 07:24:49 -04:00
feat: forbid certain usernames & room aliases
squashed from https://gitlab.com/famedly/conduit/-/merge_requests/582 Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
57a379f3a1
commit
1174ae4276
8 changed files with 143 additions and 1 deletions
|
|
@ -26,6 +26,17 @@ pub async fn create_alias_route(
|
|||
));
|
||||
}
|
||||
|
||||
if services()
|
||||
.globals
|
||||
.forbidden_room_names()
|
||||
.is_match(body.room_alias.alias())
|
||||
{
|
||||
return Err(Error::BadRequest(
|
||||
ErrorKind::Unknown,
|
||||
"Room alias is forbidden.",
|
||||
));
|
||||
}
|
||||
|
||||
if services()
|
||||
.rooms
|
||||
.alias
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue