Commit 67dc7613 by Torkel Ödegaard

fix(security): do not print ENV config values when they are passwords, fixes #3337

parent 0b4552a8
...@@ -174,6 +174,9 @@ func applyEnvVariableOverrides() { ...@@ -174,6 +174,9 @@ func applyEnvVariableOverrides() {
if len(envValue) > 0 { if len(envValue) > 0 {
key.SetValue(envValue) key.SetValue(envValue)
if strings.Contains(envKey, "PASSWORD") {
envValue = "*********"
}
appliedEnvOverrides = append(appliedEnvOverrides, fmt.Sprintf("%s=%s", envKey, envValue)) appliedEnvOverrides = append(appliedEnvOverrides, fmt.Sprintf("%s=%s", envKey, envValue))
} }
} }
...@@ -188,6 +191,9 @@ func applyCommandLineDefaultProperties(props map[string]string) { ...@@ -188,6 +191,9 @@ func applyCommandLineDefaultProperties(props map[string]string) {
value, exists := props[keyString] value, exists := props[keyString]
if exists { if exists {
key.SetValue(value) key.SetValue(value)
if strings.Contains(keyString, "password") {
value = "*********"
}
appliedCommandLineProperties = append(appliedCommandLineProperties, fmt.Sprintf("%s=%s", keyString, value)) appliedCommandLineProperties = append(appliedCommandLineProperties, fmt.Sprintf("%s=%s", keyString, value))
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment