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
This commit is contained in:
Alexander Zobnin
2023-05-10 12:30:50 +02:00
committed by GitHub
parent e059ce9c8a
commit 0b6ae0d119
2 changed files with 38 additions and 0 deletions
+4
View File
@@ -561,6 +561,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{