Fix calls to isValidUsername

pull/1/head
maru 12 months 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
}
if isValidUsername(request.Username) {
if !isValidUsername(request.Username) {
http.Error(w, "invalid username", http.StatusBadRequest)
return
}
@ -116,7 +116,7 @@ func HandleAccountLogin(w http.ResponseWriter, r *http.Request) {
return
}
if isValidUsername(request.Username) {
if !isValidUsername(request.Username) {
http.Error(w, "invalid username", http.StatusBadRequest)
return
}

Loading…
Cancel
Save