| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
http.client. (GH-19052)
Add host validation for control characters for more
CVE-2019-18348 protection.
(cherry picked from commit 83fc70159b24)
Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
validation and encoding behavior (GH-16476)
Backporting this change, I observe a couple of things:
1. The _encode_request call is no longer meaningful because the request construction will implicitly encode the request using the default encoding when the format string is used (request = '%s %s %s'...). In order to keep the code as consistent as possible, I decided to include the call as a pass-through. I'd be just as happy to remove it entirely, but I'll leave that up to the reviewer to decide. It's okay that this functionality is disabled on Python 2 because this functionality was mainly around bpo-36274, which was mainly a concern with the transition to Python 3.
2. Because _encode_request is no longer meaningful, neither is the test for it, so I've removed that test. Therefore, the meaningful part of this test is that for bpo-38216, adding a (underscore-protected) hook to customize/disable validation.
(cherry picked from commit 7774d7831e8809795c64ce27f7df52674581d298)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Disallow control chars in http URLs in urllib2.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 httplib.InvalidURL instead of ValueError as the new error case's
exception. (GH-13044)
Backport Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
(cherry picked from commit 7e200e0763f5b71c199aaf98bd5588f291585619)
Notes on backport to Python 2.7:
* test_urllib tests urllib.urlopen() which quotes the URL and so is
not vulerable to HTTP Header Injection.
* Add tests to test_urllib2 on urllib2.urlopen().
* Reject non-ASCII characters: range 0x80-0xff.
|
|
|
|
|
|
|
|
|
|
|
| |
received (GH-2825)
When the server has closed the connection before sending a status-line,
the client's error message should have a more descriptive error message
https://bugs.python.org/issue8450
https://bugs.python.org/issue8450
|
| |
|
| |
|
|
|
|
| |
Initial patch from Cory Benfield.
|
|
|
|
| |
value in the host header was set to "None". Patch by Demian Brecht.
|
|
|
|
| |
classes (such as TemporaryFile). Original patch by Atsuo Ishimoto.
|
|
|
|
|
| |
robust at shutdown. If needs to release multiple resources, they are released
even if errors are occured.
|
|
|
|
|
|
|
| |
Some http servers will reject PUT, POST, and PATCH requests if they
do not have a Content-Length header.
Patch by James Rutherford.
|
|
|
|
| |
Original patch by Demian Brecht.
|
|
|
|
| |
Patch by Cory Benfield.
|
|
|
|
|
| |
instead of (non-existing) _set_hostport. (Fix the regression introduced in
568041fd8090 )
|
|\ |
|
| | |
|
|/
|
|
| |
Original patch by Martin Panter.
|
| |
|
| |
|
|
|
|
|
|
| |
SNI (closes #22921)
Patch from Donald Stufft.
|
|
|
|
|
|
| |
httplib.HTTPSConnection
This is basically a backport of issues #9003 and #22366.
|
|
|
|
|
|
| |
than 100 headers are read.
Patch by Jyrki Pulliainen and Daniel Eriksson.
|
|
|
|
|
|
| |
using http.client.HTTPConnection.set_tunnel().
Patch by Nikolaus Rath.
|
|
|
|
| |
Original patch by Simon Sapin.
|
|
|
|
| |
less than the advertised Content-Length.
|
|
|
|
| |
Patch by Serhiy Storchaka.
|
|
|
|
|
|
| |
Content-Length and the incoming stream is finished.
Patch by Eran Rundstein.
|
|
|
|
|
| |
HTTP servers and reduce memory usage. It's actually a backport of a Python
3.2 fix. Thanks to Adrien Kunysz.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Thanks, Shawn Ligocki!
3.x version will come as a separate patch.
|
|
|
|
| |
the docs.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
BaseHTTPServer isn't fixed, this would require too much refactoring.
........
r87373 | senthil.kumaran | 2010-12-18 17:55:23 +0100 (sam., 18 déc. 2010) | 3 lines
Fix Issue6791 - Limit the HTTP header readline with _MAXLENGTH. Patch by Antoine Pitrou
........
r87381 | antoine.pitrou | 2010-12-18 18:59:18 +0100 (sam., 18 déc. 2010) | 3 lines
NEWS entry for r87373
........
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86450 | senthil.kumaran | 2010-11-13 20:27:49 +0800 (Sat, 13 Nov 2010) | 3 lines
Fix Issue5111 - Wrap the Ipv6 host with [] in the Host header
........
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85205 | senthil.kumaran | 2010-10-03 23:52:42 +0530 (Sun, 03 Oct 2010) | 3 lines
Fix Issue10012 - httplib headers, which are (sometimes mistakenly) int are explicitly cast to str (bytes - in py3k).
........
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85169 | senthil.kumaran | 2010-10-02 16:03:13 +0530 (Sat, 02 Oct 2010) | 3 lines
Use proper variable name 'data' instead of 'str' in the send method.
........
|
| |
|
|
|
|
|
|
|
|
| |
Remove special logic that closes HTTPConnection socket on EPIPE.
If the socket is closed, the client has no chance to read the response
from the server. EPIPE means that it isn't possible to write more
data from the socket, but not that it is impossible to read.
|
| |
|
|
|
|
| |
"transfer-encoding: chunked"
|
| |
|
|
|
|
|
|
| |
source_address parameter.
Also cleans up an annotation in the socket documentation.
|
|
|
|
| |
Refactored HTTPHandler tests and added testcase for proxy authorization.
|
| |
|
|
|
|
| |
`httplib.HTTPConnection.send`. Patch by Kirk McDonald.
|
|
|
|
| |
concatenating strings.
|
| |
|