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