From 0aa301c60e7c7d0250ccf03da0da9e7e0a4692ae Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Mon, 29 Oct 2018 10:00:31 -0700 Subject: [PATCH] Percent-encode the username in redact_netloc(). --- src/pip/_internal/utils/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py index d8c102b2227..1415ca06089 100644 --- a/src/pip/_internal/utils/misc.py +++ b/src/pip/_internal/utils/misc.py @@ -900,7 +900,7 @@ def redact_netloc(netloc): if user is None: return netloc password = '' if password is None else ':****' - return '{user}{password}@{netloc}'.format(user=user, + return '{user}{password}@{netloc}'.format(user=urllib_parse.quote(user), password=password, netloc=netloc)