mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer
upon malformed POST request.
This commit is contained in:
commit
e062466480
3 changed files with 13 additions and 1 deletions
|
@ -589,6 +589,12 @@ class SimpleServerTestCase(BaseServerTestCase):
|
|||
# This avoids waiting for the socket timeout.
|
||||
self.test_simple1()
|
||||
|
||||
def test_partial_post(self):
|
||||
# Check that a partial POST doesn't make the server loop: issue #14001.
|
||||
conn = httplib.HTTPConnection(ADDR, PORT)
|
||||
conn.request('POST', '/RPC2 HTTP/1.0\r\nContent-Length: 100\r\n\r\nbye')
|
||||
conn.close()
|
||||
|
||||
class MultiPathServerTestCase(BaseServerTestCase):
|
||||
threadFunc = staticmethod(http_multi_server)
|
||||
request_count = 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue