[v10.0.x] Settings: Do not hide sensitive values if it's empty (#68197)
Settings: Do not hide sensitive values if it's empty (#68088)
* Settings: Do not hide sensitive values if it's empty
* Fix implementation
* Add tests for RedactedValue function
(cherry picked from commit 0b6ae0d119)
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
This commit is contained in:
co-authored by
Alexander Zobnin
parent
d5844c35f8
commit
fffb133003
@@ -563,6 +563,10 @@ func ToAbsUrl(relativeUrl string) string {
|
||||
}
|
||||
|
||||
func RedactedValue(key, value string) string {
|
||||
if value == "" {
|
||||
return ""
|
||||
}
|
||||
|
||||
uppercased := strings.ToUpper(key)
|
||||
// Sensitive information: password, secrets etc
|
||||
for _, pattern := range []string{
|
||||
|
||||
Reference in New Issue
Block a user