diff --git a/src/api/client_server/room.rs b/src/api/client_server/room.rs index 65b67d5d..28647fa0 100644 --- a/src/api/client_server/room.rs +++ b/src/api/client_server/room.rs @@ -76,8 +76,7 @@ pub async fn create_room_route( if custom_room_id_s.contains(':') { return Err(Error::BadRequest( ErrorKind::InvalidParam, - "Custom room ID contained `:` which is not allowed. - Please note that this expects a localpart, not the full room ID.", + "Custom room ID contained `:` which is not allowed. Please note that this expects a localpart, not the full room ID.", )); } else if custom_room_id_s.contains(char::is_whitespace) { return Err(Error::BadRequest( @@ -144,8 +143,7 @@ pub async fn create_room_route( if localpart.contains(':') { return Err(Error::BadRequest( ErrorKind::InvalidParam, - "Room alias contained `:` which is not allowed. - Please note that this expects a localpart, not the full room alias.", + "Room alias contained `:` which is not allowed. Please note that this expects a localpart, not the full room alias.", )); } else if localpart.contains(char::is_whitespace) { return Err(Error::BadRequest( diff --git a/src/api/server_server.rs b/src/api/server_server.rs index 54c02764..fafc52a6 100644 --- a/src/api/server_server.rs +++ b/src/api/server_server.rs @@ -132,8 +132,6 @@ where )); } - // rust's built in parsing does not consider things like octal addresses valid - // so we should check both just to be safe. if destination.is_ip_literal() || IPAddress::is_valid(destination.host()) { info!( "Destination {} is an IP literal, checking against IP range denylist.", diff --git a/src/service/sending/mod.rs b/src/service/sending/mod.rs index 3bf18aac..785c50fe 100644 --- a/src/service/sending/mod.rs +++ b/src/service/sending/mod.rs @@ -717,8 +717,6 @@ impl Service { where T: Debug, { - // rust's built in parsing does not consider things like octal addresses valid - // so we should check both just to be safe. if destination.is_ip_literal() || IPAddress::is_valid(destination.host()) { info!( "Destination {} is an IP literal, checking against IP range denylist.",