Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
3ccc918b
Kaydet (Commit)
3ccc918b
authored
Şub 18, 2012
tarafından
Charles-François Natali
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in SimpleXMLRPCServer
upon malformed POST request.
üst
93abdd1a
cd96b4f1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
test_xmlrpc.py
Lib/test/test_xmlrpc.py
+8
-6
server.py
Lib/xmlrpc/server.py
+4
-1
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_xmlrpc.py
Dosyayı görüntüle @
3ccc918b
...
...
@@ -519,12 +519,7 @@ class BaseServerTestCase(unittest.TestCase):
def
tearDown
(
self
):
# wait on the server thread to terminate
self
.
evt
.
wait
(
4.0
)
# XXX this code does not work, and in fact stop_serving doesn't exist.
if
not
self
.
evt
.
is_set
():
self
.
evt
.
set
()
stop_serving
()
raise
RuntimeError
(
"timeout reached, test has failed"
)
self
.
evt
.
wait
()
# disable traceback reporting
xmlrpc
.
server
.
SimpleXMLRPCServer
.
_send_traceback_header
=
False
...
...
@@ -671,6 +666,13 @@ class SimpleServerTestCase(BaseServerTestCase):
server
=
xmlrpclib
.
ServerProxy
(
"http://
%
s:
%
d/RPC2"
%
(
ADDR
,
PORT
))
self
.
assertEqual
(
server
.
add
(
"a"
,
"
\xe9
"
),
"a
\xe9
"
)
def
test_partial_post
(
self
):
# Check that a partial POST doesn't make the server loop: issue #14001.
conn
=
http
.
client
.
HTTPConnection
(
ADDR
,
PORT
)
conn
.
request
(
'POST'
,
'/RPC2 HTTP/1.0
\r\n
Content-Length: 100
\r\n\r\n
bye'
)
conn
.
close
()
class
MultiPathServerTestCase
(
BaseServerTestCase
):
threadFunc
=
staticmethod
(
http_multi_server
)
request_count
=
2
...
...
Lib/xmlrpc/server.py
Dosyayı görüntüle @
3ccc918b
...
...
@@ -476,7 +476,10 @@ class SimpleXMLRPCRequestHandler(BaseHTTPRequestHandler):
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
=
b
''
.
join
(
L
)
...
...
Misc/NEWS
Dosyayı görüntüle @
3ccc918b
...
...
@@ -466,6 +466,9 @@ Core and Builtins
Library
-------
-
Issue
#
14001
:
CVE
-
2012
-
0845
:
xmlrpc
:
Fix
an
endless
loop
in
SimpleXMLRPCServer
upon
malformed
POST
request
.
-
Issue
#
13961
:
Move
importlib
over
to
using
os
.
replace
()
for
atomic
renaming
.
-
Do
away
with
ambiguous
level
values
(
as
suggested
by
PEP
328
)
in
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment