mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2024-11-28 15:35:36 +00:00
fix: use to_lowercase on /register/available username
This commit is contained in:
parent
e17bbdd42d
commit
23aecb78c7
|
@ -60,7 +60,7 @@ pub async fn get_register_available_route(
|
|||
body: Ruma<get_username_availability::Request<'_>>,
|
||||
) -> ConduitResult<get_username_availability::Response> {
|
||||
// Validate user id
|
||||
let user_id = UserId::parse_with_server_name(body.username.clone(), db.globals.server_name())
|
||||
let user_id = UserId::parse_with_server_name(body.username.to_lowercase(), db.globals.server_name())
|
||||
.ok()
|
||||
.filter(|user_id| {
|
||||
!user_id.is_historical() && user_id.server_name() == db.globals.server_name()
|
||||
|
|
Loading…
Reference in a new issue