mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 17:51:21 +00:00
Merge pull request #2593 from weaveworks/elide-url-passwords
Elide token-only credentials in cli arguments
This commit is contained in:
@@ -41,7 +41,7 @@ var (
|
||||
}
|
||||
colonFinder = regexp.MustCompile(`[^\\](:)`)
|
||||
unescapeBackslashes = regexp.MustCompile(`\\(.)`)
|
||||
elideURLCredentials = regexp.MustCompile(`//.+:.+@`)
|
||||
elideURLCredentials = regexp.MustCompile(`//.+@`)
|
||||
)
|
||||
|
||||
type prefixFormatter struct {
|
||||
|
||||
@@ -36,6 +36,7 @@ func TestLogCensoredArgs(t *testing.T) {
|
||||
"-probe.kubernetes.token=secret",
|
||||
"http://secret:secret@frontend.dev.weave.works:80",
|
||||
"https://secret:secret@cloud.weave.works:443",
|
||||
"https://secret@cloud.weave.works",
|
||||
}
|
||||
flag.CommandLine.Parse(args)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user