[3.5] bpo-30458: Disallow control chars in http URLs. (GH-12755)#13207
[3.5] bpo-30458: Disallow control chars in http URLs. (GH-12755)#13207larryhastings merged 4 commits into
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. |
Sorry, something went wrong.
Travis CI basically has the same failures and so it's likely the same issue. |
Sorry, something went wrong.
vstinner
left a comment
There was a problem hiding this comment.
LGTM. Straightforward backport (cherry-pick). The patch went fine in all other branches.
Sorry, something went wrong.
|
Compared to 3.6, I've removed the f-strings. |
Sorry, something went wrong.
|
@larryhastings: Please replace |
Sorry, something went wrong.
|
Thanks for the 3.5 love! |
Sorry, something went wrong.
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