mirror of https://github.com/pypa/pip
Merge 7222bb2a10
into a15dd75d98
This commit is contained in:
commit
e834e03c83
|
@ -0,0 +1 @@
|
|||
Mask the user when the password is empty.
|
|
@ -507,12 +507,13 @@ def redact_netloc(netloc: str) -> str:
|
|||
|
||||
For example:
|
||||
- "user:pass@example.com" returns "user:****@example.com"
|
||||
- "user:@example.com" returns "****@example.com"
|
||||
- "accesstoken@example.com" returns "****@example.com"
|
||||
"""
|
||||
netloc, (user, password) = split_auth_from_netloc(netloc)
|
||||
if user is None:
|
||||
return netloc
|
||||
if password is None:
|
||||
if not password:
|
||||
user = "****"
|
||||
password = ""
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue