Skip to content

Commit

Permalink
Elide token-only credentials in cli arguments
Browse files Browse the repository at this point in the history
Follow-up of #2568
  • Loading branch information
rndstr committed Jun 13, 2017
1 parent f403d01 commit 11355bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion prog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (
}
colonFinder = regexp.MustCompile(`[^\\](:)`)
unescapeBackslashes = regexp.MustCompile(`\\(.)`)
elideURLCredentials = regexp.MustCompile(`//.+:.+@`)
elideURLCredentials = regexp.MustCompile(`//.+@`)
)

type prefixFormatter struct {
Expand Down
1 change: 1 addition & 0 deletions prog/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 11355bb

Please sign in to comment.