diff options
author | bodqhrohro <bodqhrohro@gmail.com> | 2020-11-19 00:56:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 22:56:06 +0000 |
commit | 1cf9f20d2f740864a48bfb3465f686f4bfe61591 (patch) | |
tree | df65c63abe624d92dc1689ca79413d877679f96d /clientapi | |
parent | e65a3443a42f9a7f2ddfcf4fda3a58b660d00b14 (diff) |
Allow = in user identifiers (#1590)
While I was breaking through all the TDD bureaucracy to finally push this fix,
it turned out that it already got fixed in #1578. Still I push the rest of the
changes (basically, everything except of actually fixing the bug ;)).
`=` is crucial for matrix-bifrost which turns XMPP @'s into =40.
Signed-off-by: Bohdan Horbeshko <bodqhrohro@gmail.com>
Diffstat (limited to 'clientapi')
-rw-r--r-- | clientapi/routing/register.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clientapi/routing/register.go b/clientapi/routing/register.go index 90e9eed3..528537ef 100644 --- a/clientapi/routing/register.go +++ b/clientapi/routing/register.go @@ -209,7 +209,7 @@ func validateUsername(username string) *util.JSONResponse { } else if !validUsernameRegex.MatchString(username) { return &util.JSONResponse{ Code: http.StatusBadRequest, - JSON: jsonerror.InvalidUsername("Username can only contain characters a-z, 0-9, or '_-./'"), + JSON: jsonerror.InvalidUsername("Username can only contain characters a-z, 0-9, or '_-./='"), } } else if username[0] == '_' { // Regex checks its not a zero length string return &util.JSONResponse{ @@ -230,7 +230,7 @@ func validateApplicationServiceUsername(username string) *util.JSONResponse { } else if !validUsernameRegex.MatchString(username) { return &util.JSONResponse{ Code: http.StatusBadRequest, - JSON: jsonerror.InvalidUsername("Username can only contain characters a-z, 0-9, or '_-./'"), + JSON: jsonerror.InvalidUsername("Username can only contain characters a-z, 0-9, or '_-./='"), } } return nil |