Skip to content

Commit

Permalink
style: Made invalid auth chain less chain-y
Browse files Browse the repository at this point in the history
  • Loading branch information
betapictoris committed Jun 26, 2024
1 parent 758c4c7 commit 21b562b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions server/ctrladmin/handlers_raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@ func (c *Controller) ServeLoginDo(w http.ResponseWriter, r *http.Request) {
sessLogSave(session, w, r)
http.Redirect(w, r, r.Referer(), http.StatusSeeOther)
return
} else if user == nil {
sessAddFlashW(session, []string{"invalid username / password"})
sessLogSave(session, w, r)
http.Redirect(w, r, r.Referer(), http.StatusSeeOther)
return
} else if user.Password != password {
} else if user == nil || user.Password != password {
sessAddFlashW(session, []string{"invalid username / password"})
sessLogSave(session, w, r)
http.Redirect(w, r, r.Referer(), http.StatusSeeOther)
Expand Down

0 comments on commit 21b562b

Please sign in to comment.