mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05: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.
|
||||
validDN, isUnderBaseDN, err := l.GetValidatedUserDN(conn, username)
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user