add more logging into the password expiry checks

This commit is contained in:
2026-04-16 09:12:46 -04:00
parent 8633309968
commit 093b33db0d
2 changed files with 8 additions and 2 deletions
+3 -1
View File
@@ -40,6 +40,9 @@ func authenticateUser(username, password string) (*UserData, error) {
connected, err := ldapServer.AuthenticateUser(userDN, password)
if err != nil {
if strings.Contains(err.Error(), "Password is expired") {
return nil, fmt.Errorf("Password expired for %s\n", username)
}
return nil, err
}
if connected == false {
@@ -87,7 +90,6 @@ func loginHandler(w http.ResponseWriter, r *http.Request) {
return
}
// 2. Logic for processing the form
if r.Method == http.MethodPost {
username := r.FormValue("username")
if strings.Contains(username, "/") {