Skip to content

Commit

Permalink
add user in debugging log when too many entries
Browse files Browse the repository at this point in the history
  • Loading branch information
jdoucerain committed Jun 29, 2022
1 parent 6c50813 commit 5b77520
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions share/settings/ldap.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func LdapAuthUser(user *User,password []byte,ldapconfig LdapConfig) error {
log.Printf("DN:%s",userdn)

if len(result.Entries) != 1 {
log.Printf("too many entries returned")
log.Printf("too many entries returned for user %s",user.Name)
return fmt.Errorf("too many entries returned")
}
// Bind as the user to verify their password
Expand All @@ -71,7 +71,6 @@ func LdapAuthUser(user *User,password []byte,ldapconfig LdapConfig) error {
// Ldap Connection with TLS
func ConnectTLS(ldapconfig LdapConfig) (*ldap.Conn, error) {
var tlsConf *tls.Config
// var certpool *x509.CertPool

if ldapconfig.Insecure {
tlsConf = &tls.Config{InsecureSkipVerify: true}
Expand Down

0 comments on commit 5b77520

Please sign in to comment.