Skip to content

Commit 17af21e

Browse files
committed
Redact SSH key from URL query parameter
Signed-off-by: Guilherme Macedo <[email protected]>
1 parent 36b68b2 commit 17af21e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

url.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ package getter
33
import "net/url"
44

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

0 commit comments

Comments
 (0)