ldap login logic, subsonic api hex encrypted password

This commit is contained in:
2025-09-21 08:02:10 +02:00
parent e5c192c83c
commit 6fba25ca0b
3 changed files with 28 additions and 7 deletions

No files matched your search

+6 -4
View File
@@ -25,13 +25,15 @@ func (c *Controller) ServeLoginDo(w http.ResponseWriter, r *http.Request) {
if err != nil {
log.Println("Failed to check LDAP credentials:", err)
sessAddFlashW(session, []string{"failed to check LDAP credentials"})
sessLogSave(session, w, r)
http.Redirect(w, r, r.Referer(), http.StatusSeeOther)
return
} 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 || user.Password != password {
sessAddFlashW(session, []string{"invalid username / password"})
sessLogSave(session, w, r)