You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
urllib.request:AttributeError: 'dict' object has no attribute 'get_all' in http_error_auth_reqed function #89735
The python version I currently use in my development environment is 3.7.4. Using the following script, the program has never output, and seems to have entered an infinite loop.
To reproduce the issue we can use the following code:
So I tried to upgrade it to version 3.7.12, and the program will directly report an error. The information is as follows:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/urllib/request.py", line 990, in http_error_auth_reqed
headers = headers.get_all(authreq)
AttributeError: 'dict' object has no attribute 'get_all'
This problem also exists when I upgrade Python 3 to 3.11.0a1. In Python version 3.7.4, the cause of program hang on seems to be a security vulnerability. Refer to https://bugs.python.org/issue39503. The reason for CVE is not the wrong type of headers. However, after repairing CVE, it seems that the type of headers is limited? For the CVE patch, I tried to only fix the part of the regular expression, and the program can run. So, after repairing CVE-2020-8492, what type should the headers parameter be for http_error_auth_reqed function? Based on the current code, how should I adapt and modify it to make it run normally?
Activity
sxt1001 commentedon Oct 22, 2021
The python version I currently use in my development environment is 3.7.4. Using the following script, the program has never output, and seems to have entered an infinite loop.
To reproduce the issue we can use the following code:
So I tried to upgrade it to version 3.7.12, and the program will directly report an error. The information is as follows:
This problem also exists when I upgrade Python 3 to 3.11.0a1. In Python version 3.7.4, the cause of program hang on seems to be a security vulnerability. Refer to https://bugs.python.org/issue39503. The reason for CVE is not the wrong type of headers. However, after repairing CVE, it seems that the type of headers is limited? For the CVE patch, I tried to only fix the part of the regular expression, and the program can run. So, after repairing CVE-2020-8492, what type should the headers parameter be for http_error_auth_reqed function? Based on the current code, how should I adapt and modify it to make it run normally?
9 remaining items
gh-89735: Document requirements for the *headers* argument (GH-155640)
[3.13] gh-89735: Document requirements for the *headers* argument (GH…
[3.14] gh-89735: Document requirements for the *headers* argument (GH…
[3.15] gh-89735: Document requirements for the *headers* argument (GH…
pythongh-89735: Document requirements for the *headers* argument (pyt…