Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CSAN
Csan
Commits
20d4e86e
Unverified
Commit
20d4e86e
authored
Sep 23, 2020
by
stonezdj(Daojun Zhang)
Committed by
GitHub
Sep 23, 2020
Browse files
Merge pull request #13109 from Thoro/fix-encrypt-error-message
Add error log in case encryption on config save fails
parents
59f9ef7e
452a0c9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/common/config/store/driver/db.go
src/common/config/store/driver/db.go
+2
-0
No files found.
src/common/config/store/driver/db.go
View file @
20d4e86e
...
...
@@ -72,6 +72,8 @@ func (d *Database) Save(cfgs map[string]interface{}) error {
if
_
,
ok
:=
item
.
ItemType
.
(
*
metadata
.
PasswordType
);
ok
{
if
encryptPassword
,
err
:=
encrypt
.
Instance
()
.
Encrypt
(
strValue
);
err
==
nil
{
entry
.
Value
=
encryptPassword
}
else
{
log
.
Errorf
(
"encrypt password failed, error: %v"
,
err
)
}
}
configEntries
=
append
(
configEntries
,
*
entry
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment