mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-15 10:53:09 -06:00
Squash username to all lowercase letters upon registration
Signed-off-by: Andrew Morgan (https://amorgan.xyz) <andrew@amorgan.xyz>
This commit is contained in:
parent
cc12fc930a
commit
aea970e24f
|
|
@ -183,6 +183,9 @@ func Register(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Squash username to all lowercase letters
|
||||||
|
r.Username = strings.ToLower(r.Username)
|
||||||
|
|
||||||
if resErr = validateUserName(r.Username); resErr != nil {
|
if resErr = validateUserName(r.Username); resErr != nil {
|
||||||
return *resErr
|
return *resErr
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue