mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-29 03:57:56 +01:00
Merge pull request #13109 from Thoro/fix-encrypt-error-message
Add error log in case encryption on config save fails
This commit is contained in:
commit
20d4e86e0d
@ -72,6 +72,8 @@ func (d *Database) Save(cfgs map[string]interface{}) error {
|
|||||||
if _, ok := item.ItemType.(*metadata.PasswordType); ok {
|
if _, ok := item.ItemType.(*metadata.PasswordType); ok {
|
||||||
if encryptPassword, err := encrypt.Instance().Encrypt(strValue); err == nil {
|
if encryptPassword, err := encrypt.Instance().Encrypt(strValue); err == nil {
|
||||||
entry.Value = encryptPassword
|
entry.Value = encryptPassword
|
||||||
|
} else {
|
||||||
|
log.Errorf("encrypt password failed, error: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
configEntries = append(configEntries, *entry)
|
configEntries = append(configEntries, *entry)
|
||||||
|
Loading…
Reference in New Issue
Block a user