summaryrefslogtreecommitdiffstats
path: root/Lib/urllib
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2012-01-14 11:12:28 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2012-01-14 11:12:28 (GMT)
commit4479577388e737aba228ce8fbb7583add78ce80d (patch)
treef1cb34e2f5f88e21ac172fb575717ec98535ee3e /Lib/urllib
parent6c3dd7ea42c20d8e71da79c81b6c0738311d7f2e (diff)
parentc5c5a14577f1188125630dcbf31c5c2cd258b541 (diff)
downloadcpython-4479577388e737aba228ce8fbb7583add78ce80d.zip
cpython-4479577388e737aba228ce8fbb7583add78ce80d.tar.gz
cpython-4479577388e737aba228ce8fbb7583add78ce80d.tar.bz2
merge from 3.2 - Fix Issue #13642: Unquote before b64encoding user:password during Basic Authentication.
Diffstat (limited to 'Lib/urllib')
-rw-r--r--Lib/urllib/request.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 2f74759..c9f2c1d 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -1693,11 +1693,13 @@ class URLopener:
if not host: raise IOError('http error', 'no host given')
if proxy_passwd:
+ proxy_passwd = unquote(proxy_passwd)
proxy_auth = base64.b64encode(proxy_passwd.encode()).decode('ascii')
else:
proxy_auth = None
if user_passwd:
+ user_passwd = unquote(user_passwd)
auth = base64.b64encode(user_passwd.encode()).decode('ascii')
else:
auth = None