Fix calls to isValidUsername

pull/1/head
maru 1 year ago
parent b4be49bf80
commit 020c4d05bf
No known key found for this signature in database
GPG Key ID: 37689350E9CD0F0D

@ -68,7 +68,7 @@ func HandleAccountRegister(w http.ResponseWriter, r *http.Request) {
return return
} }
if isValidUsername(request.Username) { if !isValidUsername(request.Username) {
http.Error(w, "invalid username", http.StatusBadRequest) http.Error(w, "invalid username", http.StatusBadRequest)
return return
} }
@ -116,7 +116,7 @@ func HandleAccountLogin(w http.ResponseWriter, r *http.Request) {
return return
} }
if isValidUsername(request.Username) { if !isValidUsername(request.Username) {
http.Error(w, "invalid username", http.StatusBadRequest) http.Error(w, "invalid username", http.StatusBadRequest)
return return
} }

Loading…
Cancel
Save