mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #26873: xmlrpc now raises ResponseError on unsupported type tags
instead of silently return incorrect result.
This commit is contained in:
parent
a3fd0b26ba
commit
290fed43d9
3 changed files with 20 additions and 0 deletions
|
@ -640,6 +640,7 @@ class Unmarshaller:
|
|||
self._stack = []
|
||||
self._marks = []
|
||||
self._data = []
|
||||
self._value = False
|
||||
self._methodname = None
|
||||
self._encoding = "utf-8"
|
||||
self.append = self._stack.append
|
||||
|
@ -669,6 +670,8 @@ class Unmarshaller:
|
|||
if tag == "array" or tag == "struct":
|
||||
self._marks.append(len(self._stack))
|
||||
self._data = []
|
||||
if self._value and tag not in self.dispatch:
|
||||
raise ResponseError("unknown tag %r" % tag)
|
||||
self._value = (tag == "value")
|
||||
|
||||
def data(self, text):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue