1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-12-26 22:34:36 +01:00

fix: /register lowercases user ids

fixes #24
This commit is contained in:
timokoesters 2020-05-27 07:09:23 +02:00
parent dd80a8591d
commit ca77c79222
No known key found for this signature in database
GPG key ID: 356E705610F626D5

View file

@ -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()