mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #2917 from matt-jordan/qop
requests/auth: Handle an empty 'qop' attribute in an Authenticate challenge
This commit is contained in:
+1
-1
@@ -136,7 +136,7 @@ class HTTPDigestAuth(AuthBase):
|
||||
if _algorithm == 'MD5-SESS':
|
||||
HA1 = hash_utf8('%s:%s:%s' % (HA1, nonce, cnonce))
|
||||
|
||||
if qop is None:
|
||||
if not qop:
|
||||
respdig = KD(HA1, "%s:%s" % (nonce, HA2))
|
||||
elif qop == 'auth' or 'auth' in qop.split(','):
|
||||
noncebit = "%s:%s:%s:%s:%s" % (
|
||||
|
||||
Reference in New Issue
Block a user