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

Backported to 2.3.
This commit is contained in:
Martin v. Löwis 2004-05-06 01:41:26 +00:00
parent f1f0560832
commit 8b3e871a19
1 changed files with 1 additions and 1 deletions

View File

@ -696,7 +696,7 @@ class AbstractBasicAuthHandler:
def retry_http_basic_auth(self, host, req, realm): def retry_http_basic_auth(self, host, req, realm):
user,pw = self.passwd.find_user_password(realm, host) user,pw = self.passwd.find_user_password(realm, host)
if pw: if pw is not None:
raw = "%s:%s" % (user, pw) raw = "%s:%s" % (user, pw)
auth = 'Basic %s' % base64.encodestring(raw).strip() auth = 'Basic %s' % base64.encodestring(raw).strip()
if req.headers.get(self.auth_header, None) == auth: if req.headers.get(self.auth_header, None) == auth: