Break user credentials from host at the rightmost '@'
The rightmost '@' in a url netloc field separates the user:password from the hostname:port. Using the first may cause the separation to occur in the username or password field (if unencoded). Change-Id: I7b02d8e0cbdf875ea80a55065ce98fa73696e05f Closes-Bug: 1675423
This commit is contained in:
parent
2ee6a2a480
commit
d7775859b4
@ -432,7 +432,7 @@ class TransportURL(object):
|
||||
username = password = port = None
|
||||
|
||||
if '@' in host:
|
||||
username, hostname = host.split('@', 1)
|
||||
username, hostname = host.rsplit('@', 1)
|
||||
if ':' in username:
|
||||
username, password = username.split(':', 1)
|
||||
password = parse.unquote(password)
|
||||
|
Loading…
x
Reference in New Issue
Block a user