Only redact the URL password if it was provided
This commit is contained in:
parent
bb1dc0b7a5
commit
fc5e065878
4
main.go
4
main.go
|
|
@ -1274,7 +1274,9 @@ func redactURL(urlstr string) string {
|
|||
return err.Error()
|
||||
}
|
||||
if u.User != nil {
|
||||
u.User = url.UserPassword(u.User.Username(), redactedString)
|
||||
if _, found := u.User.Password(); found {
|
||||
u.User = url.UserPassword(u.User.Username(), redactedString)
|
||||
}
|
||||
}
|
||||
return u.String()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue