-
-
Notifications
You must be signed in to change notification settings - Fork 32k
[3.5] bpo-30458: Disallow control chars in http URLs. (GH-12755) #13207
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
Conversation
Disallow control chars in http URLs in urllib.urlopen. This addresses a potential security problem for applications that do not sanity check their URLs where http request headers could be injected. Disable https related urllib tests on a build without ssl (pythonGH-13032) These tests require an SSL enabled build. Skip these tests when python is built without SSL to fix test failures. Use http.client.InvalidURL instead of ValueError as the new error case's exception. (pythonGH-13044) Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
Multiple tests failed on AppVeyor:
With TLS certification validation error:
It seems like these failures are related to https://bugs.python.org/issue36816: PR #13200 isn't merged yet. |
Travis CI basically has the same failures and so it's likely the same issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Straightforward backport (cherry-pick). The patch went fine in all other branches.
Compared to 3.6, I've removed the f-strings. |
@larryhastings: Please replace |
Thanks for the 3.5 love! |
Disallow control chars in http URLs in urllib.urlopen. This addresses a potential security problem for applications that do not sanity check their URLs where http request headers could be injected.
Disable https related urllib tests on a build without ssl (GH-13032)
These tests require an SSL enabled build. Skip these tests when python is built without SSL to fix test failures.
Use http.client.InvalidURL instead of ValueError as the new error case's exception. (GH-13044)
Co-Authored-By: Miro Hrončok miro@hroncok.cz
https://bugs.python.org/issue30458