Do session change on failed LDAP check

This commit is contained in:
Daniel Hall
2024-04-08 18:13:16 -07:00
parent 0f7e24b39b
commit e2415e944c
+4 -3
View File
@@ -27,10 +27,11 @@ func (c *Controller) ServeLoginDo(w http.ResponseWriter, r *http.Request) {
sessAddFlashW(session, []string{"failed to check LDAP credentials"})
} else if !ok {
sessAddFlashW(session, []string{"invalid username / password"})
sessLogSave(session, w, r)
http.Redirect(w, r, r.Referer(), http.StatusSeeOther)
return
}
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)