mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-30 06:03:45 +01:00
handle unexpected error in ldap search
This commit is contained in:
parent
97e214c3d3
commit
7487095dd8
@ -59,7 +59,8 @@ func (l *Auth) Authenticate(m models.AuthModel) (*models.User, error) {
|
|||||||
ldapUsers, err := ldapUtils.SearchUser(ldapConfs)
|
ldapUsers, err := ldapUtils.SearchUser(ldapConfs)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("ldap search fail: %v", err)
|
log.Warningf("ldap search fail: %v", err)
|
||||||
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(ldapUsers) == 0 {
|
if len(ldapUsers) == 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user