diff --git a/src/github.com/matrix-org/dendrite/clientapi/routing/register.go b/src/github.com/matrix-org/dendrite/clientapi/routing/register.go index ef8fbaf54..ac88e1ce1 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/routing/register.go +++ b/src/github.com/matrix-org/dendrite/clientapi/routing/register.go @@ -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 { return *resErr }