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
290fed43
Kaydet (Commit)
290fed43
authored
May 04, 2016
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #26873: xmlrpc now raises ResponseError on unsupported type tags
instead of silently return incorrect result.
üst
a3fd0b26
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
test_xmlrpc.py
Lib/test/test_xmlrpc.py
+14
-0
client.py
Lib/xmlrpc/client.py
+3
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_xmlrpc.py
Dosyayı görüntüle @
290fed43
...
@@ -224,6 +224,20 @@ class XMLRPCTestCase(unittest.TestCase):
...
@@ -224,6 +224,20 @@ class XMLRPCTestCase(unittest.TestCase):
self
.
assertIs
(
type
(
newvalue
),
xmlrpclib
.
Binary
)
self
.
assertIs
(
type
(
newvalue
),
xmlrpclib
.
Binary
)
self
.
assertIsNone
(
m
)
self
.
assertIsNone
(
m
)
def
test_loads_unsupported
(
self
):
ResponseError
=
xmlrpclib
.
ResponseError
data
=
'<params><param><value><spam/></value></param></params>'
self
.
assertRaises
(
ResponseError
,
xmlrpclib
.
loads
,
data
)
data
=
(
'<params><param><value><array>'
'<value><spam/></value>'
'</array></value></param></params>'
)
self
.
assertRaises
(
ResponseError
,
xmlrpclib
.
loads
,
data
)
data
=
(
'<params><param><value><struct>'
'<member><name>a</name><value><spam/></value></member>'
'<member><name>b</name><value><spam/></value></member>'
'</struct></value></param></params>'
)
self
.
assertRaises
(
ResponseError
,
xmlrpclib
.
loads
,
data
)
def
test_get_host_info
(
self
):
def
test_get_host_info
(
self
):
# see bug #3613, this raised a TypeError
# see bug #3613, this raised a TypeError
transp
=
xmlrpc
.
client
.
Transport
()
transp
=
xmlrpc
.
client
.
Transport
()
...
...
Lib/xmlrpc/client.py
Dosyayı görüntüle @
290fed43
...
@@ -640,6 +640,7 @@ class Unmarshaller:
...
@@ -640,6 +640,7 @@ class Unmarshaller:
self
.
_stack
=
[]
self
.
_stack
=
[]
self
.
_marks
=
[]
self
.
_marks
=
[]
self
.
_data
=
[]
self
.
_data
=
[]
self
.
_value
=
False
self
.
_methodname
=
None
self
.
_methodname
=
None
self
.
_encoding
=
"utf-8"
self
.
_encoding
=
"utf-8"
self
.
append
=
self
.
_stack
.
append
self
.
append
=
self
.
_stack
.
append
...
@@ -669,6 +670,8 @@ class Unmarshaller:
...
@@ -669,6 +670,8 @@ class Unmarshaller:
if
tag
==
"array"
or
tag
==
"struct"
:
if
tag
==
"array"
or
tag
==
"struct"
:
self
.
_marks
.
append
(
len
(
self
.
_stack
))
self
.
_marks
.
append
(
len
(
self
.
_stack
))
self
.
_data
=
[]
self
.
_data
=
[]
if
self
.
_value
and
tag
not
in
self
.
dispatch
:
raise
ResponseError
(
"unknown tag
%
r"
%
tag
)
self
.
_value
=
(
tag
==
"value"
)
self
.
_value
=
(
tag
==
"value"
)
def
data
(
self
,
text
):
def
data
(
self
,
text
):
...
...
Misc/NEWS
Dosyayı görüntüle @
290fed43
...
@@ -107,6 +107,9 @@ Core and Builtins
...
@@ -107,6 +107,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #26873: xmlrpc now raises ResponseError on unsupported type tags
instead of silently return incorrect result.
- Issue #26711: Fixed the comparison of plistlib.Data with other types.
- Issue #26711: Fixed the comparison of plistlib.Data with other types.
- Issue #24114: Fix an uninitialized variable in `ctypes.util`.
- Issue #24114: Fix an uninitialized variable in `ctypes.util`.
...
...
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