just remove double quotes if found instead
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
e0419d9c5d
commit
9858b33b37
1 changed files with 1 additions and 8 deletions
|
@ -92,18 +92,11 @@ pub async fn create_room_route(
|
||||||
}
|
}
|
||||||
|
|
||||||
let full_room_id = "!".to_owned()
|
let full_room_id = "!".to_owned()
|
||||||
+ custom_room_id_s.as_str()
|
+ &custom_room_id_s.replace('"', "")
|
||||||
+ ":"
|
+ ":"
|
||||||
+ services().globals.server_name().as_ref();
|
+ services().globals.server_name().as_ref();
|
||||||
debug!("Full room ID: {}", full_room_id);
|
debug!("Full room ID: {}", full_room_id);
|
||||||
|
|
||||||
if full_room_id.contains('"') {
|
|
||||||
return Err(Error::BadRequest(
|
|
||||||
ErrorKind::InvalidParam,
|
|
||||||
"Custom room ID contained `\"` which is not allowed.",
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
room_id = RoomId::parse(full_room_id).map_err(|e| {
|
room_id = RoomId::parse(full_room_id).map_err(|e| {
|
||||||
info!(
|
info!(
|
||||||
"User attempted to create room with custom room ID but failed parsing: {}",
|
"User attempted to create room with custom room ID but failed parsing: {}",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue