Skip to content

Commit

Permalink
Redact SSH key from URL query parameter
Browse files Browse the repository at this point in the history
Signed-off-by: Guilherme Macedo <[email protected]>
  • Loading branch information
macedogm committed Jan 3, 2022
1 parent 36b68b2 commit 17af21e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion url.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package getter
import "net/url"

// RedactURL is a port of url.Redacted from the standard library,
// which is like url.String but replaces any password with "xxxxx".
// which is like url.String but replaces any password with "redacted".
// Only the password in u.URL is redacted. This allows the library
// to maintain compatibility with go1.14.
// This port was also extended to redact SSH key from URL query parameter.
func RedactURL(u *url.URL) string {
if u == nil {
return ""
Expand Down

0 comments on commit 17af21e

Please sign in to comment.