mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Percent-decode special characters in SVN URL credentials.
This commit is contained in:
parent
b087f261fb
commit
8166eb6c32
1
news/5968.bugfix
Normal file
1
news/5968.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Percent-decode special characters in SVN URL credentials.
|
|
@ -25,6 +25,7 @@ from pip._vendor.retrying import retry # type: ignore
|
|||
from pip._vendor.six import PY2
|
||||
from pip._vendor.six.moves import input
|
||||
from pip._vendor.six.moves.urllib import parse as urllib_parse
|
||||
from pip._vendor.six.moves.urllib.parse import unquote as urllib_unquote
|
||||
|
||||
from pip._internal.exceptions import CommandError, InstallationError
|
||||
from pip._internal.locations import (
|
||||
|
@ -878,10 +879,14 @@ def split_auth_from_netloc(netloc):
|
|||
# Split from the left because that's how urllib.parse.urlsplit()
|
||||
# behaves if more than one : is present (which again can be checked
|
||||
# using the password attribute of the return value)
|
||||
user_pass = tuple(auth.split(':', 1))
|
||||
user_pass = auth.split(':', 1)
|
||||
else:
|
||||
user_pass = auth, None
|
||||
|
||||
user_pass = tuple(
|
||||
None if x is None else urllib_unquote(x) for x in user_pass
|
||||
)
|
||||
|
||||
return netloc, user_pass
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue