Browse Source

fix: /register lowercases user ids

fixes #24
ruma
timokoesters 6 years ago
parent
commit
ca77c79222
No known key found for this signature in database
GPG Key ID: 356E705610F626D5
  1. 3
      src/client_server.rs

3
src/client_server.rs

@ -126,7 +126,8 @@ pub fn register_route( @@ -126,7 +126,8 @@ pub fn register_route(
let user_id = match UserId::parse_with_server_name(
body.username
.clone()
.unwrap_or_else(|| utils::random_string(GUEST_NAME_LENGTH)),
.unwrap_or_else(|| utils::random_string(GUEST_NAME_LENGTH))
.to_lowercase(),
db.globals.server_name(),
)
.ok()

Loading…
Cancel
Save