-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request fails when 'WWW-Authenticate' header for Digest Authentication does not contain 'qop' #83729
Comments
When making an HTTP request using an opener with an attached HTTPDigestAuthHandler, the request causes a crash when the returned 'WWW-Authenticate' header for the 'Digest' domain does not return the optional 'qop' value. Response headers: Crash: Error: Exception: 'NoneType' object has no attribute 'split'
Traceback (most recent call last):
...
File "/home/sbalousek/bin/restap.py", line 1317, in RunTest
status, payload, contentType = ExecuteRequest(baseUrl, test, tap);
File "/home/sbalousek/bin/restap.py", line 1398, in ExecuteRequest
response = opener.open(request, payload, timeout);
File "/usr/lib/python3.8/urllib/request.py", line 523, in open
response = meth(req, response)
File "/home/sbalousek/bin/restap.py", line 1065, in http_response
return self.process_response(request, response, HTTPErrorProcessor.http_response);
File "/home/sbalousek/bin/restap.py", line 1056, in process_response
return handler(self, request, response);
File "/usr/lib/python3.8/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/usr/lib/python3.8/urllib/request.py", line 555, in error
result = self._call_chain(*args)
File "/usr/lib/python3.8/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 1203, in http_error_401
retry = self.http_error_auth_reqed('www-authenticate',
File "/usr/lib/python3.8/urllib/request.py", line 1082, in http_error_auth_reqed
return self.retry_http_digest_auth(req, authreq)
File "/usr/lib/python3.8/urllib/request.py", line 1090, in retry_http_digest_auth
auth = self.get_authorization(req, chal)
File "/usr/lib/python3.8/urllib/request.py", line 1143, in get_authorization
if 'auth' in qop.split(','):
AttributeError: 'NoneType' object has no attribute 'split' Diagnosis: This bug was introduced in changes for bpo-38686. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: