mirror of
https://github.com/project-zot/zot.git
synced 2026-06-18 13:37:57 +08:00
fix: Add credentials config verification
This commit is contained in:
@@ -861,8 +861,8 @@ func readLDAPCredentials(ldapConfigPath string) (config.LDAPCredentials, error)
|
||||
|
||||
var ldapCredentials config.LDAPCredentials
|
||||
|
||||
if err := viperInstance.Unmarshal(&ldapCredentials); err != nil {
|
||||
log.Error().Err(err).Msg("failed to unmarshal new config")
|
||||
if err := viperInstance.UnmarshalExact(&ldapCredentials); err != nil {
|
||||
log.Error().Err(err).Msg("failed to unmarshal ldap credentials config")
|
||||
|
||||
return config.LDAPCredentials{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user