Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.4
python.370
python-2.7-CVE-2012-0845-xmlrpc-DoS.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File python-2.7-CVE-2012-0845-xmlrpc-DoS.patch of Package python.370
# HG changeset patch # User Charles-François Natali <neologix@free.fr> # Date 1329571834 -3600 # Node ID 0c02f30b2538a6d426e0162f2a3f59afb1d870e7 # Parent 7052eb923fb873f19ddf2ac4d962d4358753be18# Parent 24244a744d0143b24137b343d93d937c223877aa Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer upon malformed POST request. diff --git a/Lib/SimpleXMLRPCServer.py b/Lib/SimpleXMLRPCServer.py --- a/Lib/SimpleXMLRPCServer.py +++ b/Lib/SimpleXMLRPCServer.py @@ -486,7 +486,10 @@ class SimpleXMLRPCRequestHandler(BaseHTT L = [] while size_remaining: chunk_size = min(size_remaining, max_chunk_size) - L.append(self.rfile.read(chunk_size)) + chunk = self.rfile.read(chunk_size) + if not chunk: + break + L.append(chunk) size_remaining -= len(L[-1]) data = ''.join(L) diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py --- a/Lib/test/test_xmlrpc.py +++ b/Lib/test/test_xmlrpc.py @@ -589,6 +589,12 @@ class SimpleServerTestCase(BaseServerTes # 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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor