mirror of
https://github.com/minio/minio.git
synced 2025-04-07 05:10:30 -04:00
Fix error when validating DN that is not under base DN (#19971)
This commit is contained in:
parent
5f6a25cdd0
commit
168ae81b1f
@ -98,7 +98,8 @@ func (l *Config) GetValidatedDNForUsername(username string) (*xldap.DNSearchResu
|
|||||||
// under a configured base DN in the LDAP directory.
|
// under a configured base DN in the LDAP directory.
|
||||||
validDN, isUnderBaseDN, err := l.GetValidatedUserDN(conn, username)
|
validDN, isUnderBaseDN, err := l.GetValidatedUserDN(conn, username)
|
||||||
if err == nil && !isUnderBaseDN {
|
if err == nil && !isUnderBaseDN {
|
||||||
return nil, fmt.Errorf("Unable to find user DN: %w", err)
|
// Not under any configured base DN, so treat as not found.
|
||||||
|
return nil, nil
|
||||||
}
|
}
|
||||||
return validDN, err
|
return validDN, err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user