Kaydet (Commit) 8b3e871a authored tarafından Martin v. Löwis's avatar Martin v. Löwis

Patch #944110: Properly process empty passwords. Fixes #944082.

Backported to 2.3.
üst f1f05608
......@@ -696,7 +696,7 @@ class AbstractBasicAuthHandler:
def retry_http_basic_auth(self, host, req, realm):
user,pw = self.passwd.find_user_password(realm, host)
if pw:
if pw is not None:
raw = "%s:%s" % (user, pw)
auth = 'Basic %s' % base64.encodestring(raw).strip()
if req.headers.get(self.auth_header, None) == auth:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment