We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 334ade4 commit e371318Copy full SHA for e371318
1 file changed
git/git.go
@@ -479,7 +479,15 @@ func RedactURL(u string) string {
479
// Successfully parsed as a URL with a scheme
480
// Redact userinfo if present (handles user, user:pass, token, URL-encoded creds)
481
if parsed.User != nil {
482
- parsed.User = url.User("***")
+ // Build URL manually to avoid url.User encoding *** as %2A%2A%2A
483
+ result := parsed.Scheme + "://***@" + parsed.Host + parsed.Path
484
+ if parsed.RawQuery != "" {
485
+ result += "?" + parsed.RawQuery
486
+ }
487
+ if parsed.Fragment != "" {
488
+ result += "#" + parsed.Fragment
489
490
+ return result
491
}
492
return parsed.String()
493
0 commit comments