mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-02-22 16:41:28 +08:00
Fix calls to isValidUsername
This commit is contained in:
parent
b4be49bf80
commit
020c4d05bf
@ -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…
x
Reference in New Issue
Block a user