Skip to content
Snippets Groups Projects
Commit d4d8c6eb authored by 🥺's avatar 🥺 :transgender_flag: Committed by 🥺
Browse files

check if custom room ID is apart of forbidden room alias

parent fc93b29a
No related branches found
No related tags found
No related merge requests found
...@@ -90,6 +90,18 @@ pub async fn create_room_route( ...@@ -90,6 +90,18 @@ pub async fn create_room_route(
)); ));
} }
// apply forbidden room alias checks to custom room IDs too
if services()
.globals
.forbidden_room_names()
.is_match(&custom_room_id_s)
{
return Err(Error::BadRequest(
ErrorKind::Unknown,
"Custom room ID is forbidden.",
));
}
let full_room_id = "!".to_owned() let full_room_id = "!".to_owned()
+ &custom_room_id_s.replace('"', "") + &custom_room_id_s.replace('"', "")
+ ":" + ":"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment