G Pas
This commit is contained in:
parent
345ddb2031
commit
ab02beb314
2 changed files with 5 additions and 5 deletions
6
gpas.go
6
gpas.go
|
@ -93,9 +93,9 @@ func passwordFound(user User, config *ConfigFile, ldapConn *ldap.Conn) (bool, er
|
||||||
}
|
}
|
||||||
err = l.Bind(user.DN, user.Password)
|
err = l.Bind(user.DN, user.Password)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf(fmt.Sprint("passwordFound %v", err))
|
log.Printf("passwordFound %v", err)
|
||||||
log.Printf(fmt.Sprint("passwordFound %v", user.DN))
|
log.Printf("passwordFound %v", user.DN)
|
||||||
log.Printf(fmt.Sprint("passwordFound %v", user.UID))
|
log.Printf("passwordFound %v", user.UID)
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
return true, nil
|
return true, nil
|
||||||
|
|
|
@ -146,8 +146,8 @@ func handleFoundPassword(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
data.Success, err = passwordFound(user, config, ldapConn)
|
data.Success, err = passwordFound(user, config, ldapConn)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf(fmt.Sprint("handleFoundPassword / passwordFound %v", err))
|
log.Printf("handleFoundPassword / passwordFound %v", err)
|
||||||
log.Printf(fmt.Sprint("handleFoundPassword / passwordFound %user", err))
|
log.Printf("handleFoundPassword / passwordFound %v", err)
|
||||||
data.ErrorMessage = err.Error()
|
data.ErrorMessage = err.Error()
|
||||||
}
|
}
|
||||||
templateFoundPasswordPage.Execute(w, data)
|
templateFoundPasswordPage.Execute(w, data)
|
||||||
|
|
Loading…
Reference in a new issue