diff --git a/cmd/helper.go b/cmd/helper.go index 863475ab8..39dfda3b9 100644 --- a/cmd/helper.go +++ b/cmd/helper.go @@ -50,11 +50,11 @@ func unwrap(err error) (res []string) { // redact redacts a configuration string func redact(src string) string { secrets := []string{ - "url", "uri", "host", "broker", "mac", // infrastructure + "mac", // infrastructure "sponsortoken", "plant", // global settings "user", "password", "pin", // users "token", "access", "refresh", // tokens - "ain", "id", "secret", "serial", "deviceid", "machineid", // devices + "ain", "secret", "serial", "deviceid", "machineid", // devices "vin"} // vehicles return regexp. MustCompile(fmt.Sprintf(`\b(%s)\b.*?:.*`, strings.Join(secrets, "|"))). diff --git a/cmd/root_test.go b/cmd/root_test.go index adf28764e..b17dafe7e 100644 --- a/cmd/root_test.go +++ b/cmd/root_test.go @@ -27,8 +27,8 @@ func TestRedact(t *testing.T) { token: access: geheim refresh: geheim - host: geheim - url: geheim + pin: geheim + mac: geheim secret: geheim # comment secret : geheim `