File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,11 +208,14 @@ def test_dump_encoding(self):
208208 self .assertEqual (xmlrpclib .loads (strg )[0 ][0 ], value )
209209 self .assertEqual (xmlrpclib .loads (strg )[1 ], methodname )
210210
211- def test_methodname_sanitization (self ):
211+ def test_dump_escape_methodname (self ):
212212 # gh-148954: test that methodname is sanitized in dumps()
213213 payload = 'foo</methodName><injected attr="evil"/><methodName>bar'
214214 s = xmlrpclib .dumps ((), methodname = payload )
215- self .assertIn ('<methodName>foo</methodName><injected attr="evil"/><methodName>bar</methodName>' , s )
215+ self .assertIn (
216+ '<methodName>foo</methodName><injected attr="evil"/>'
217+ '<methodName>bar</methodName>' , s
218+ )
216219 self .assertNotIn ('<injected attr="evil"/>' , s )
217220 load , m = xmlrpclib .loads (s )
218221 self .assertEqual (m , payload )
You can’t perform that action at this time.
0 commit comments