diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-05-04 08:26:42 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-05-04 08:26:42 (GMT) |
commit | 290fed43d9cdcd3d738dda319e63e26d7972d734 (patch) | |
tree | 3b93719d90b2c19df4f69c9ca2049036e3e3271f /Lib/xmlrpc/client.py | |
parent | a3fd0b26ba7d302475e051b698c86f512d0e7a14 (diff) | |
download | cpython-290fed43d9cdcd3d738dda319e63e26d7972d734.zip cpython-290fed43d9cdcd3d738dda319e63e26d7972d734.tar.gz cpython-290fed43d9cdcd3d738dda319e63e26d7972d734.tar.bz2 |
Issue #26873: xmlrpc now raises ResponseError on unsupported type tags
instead of silently return incorrect result.
Diffstat (limited to 'Lib/xmlrpc/client.py')
-rw-r--r-- | Lib/xmlrpc/client.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py index 551dce9..bbf9ee6 100644 --- a/Lib/xmlrpc/client.py +++ b/Lib/xmlrpc/client.py @@ -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): |