Bug 1313425

Summary: Spacewalk produces invalid xmlrpc when transmitting ']]>' sequence
Product: [Community] Spacewalk Reporter: Gennadii Altukhov <galtukho>
Component: APIAssignee: Gennadii Altukhov <galtukho>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.4CC: dgross, mmello, satqe-list, slukasik, tkasparek, tpapaioa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: redstone-xmlrpc-1.1_20071120-16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 681463 Environment:
Last Closed: 2016-06-16 08:10:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 681463    
Bug Blocks: 462714, 1484117    

Description Gennadii Altukhov 2016-03-01 15:19:54 UTC
Description of problem:
Python's xmlrpclib cannot decode ']]>' as a string parameter.

Character sequence ']]>' is not permitted to appear in content unless
used to mark the end of CDATA-Section. Usually there is no need to
escape the '>' character. But it really should be escaped in the case
of ']]>' sequence generate a valid xml.


How reproducible:
always

Steps to Reproduce:
1. send API XML-RPC request to Spacewalk server, respond should contain ']]>' sequence
  
Actual results:
[[snip]]
  File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.6/xmlrpclib.py", line 1253, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1387, in _parse_response
    p.feed(response)
  File "/usr/lib/python2.6/xmlrpclib.py", line 601, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 593

Expected results:
python xmlrpclib should parse respond w/o any problems

Additional info:
in request to server sequence ']]>' correctly escaped to ']]&gt;', but in respond from server not. Looks like a bug in redstone XmlRpcSerializer.

Comment 1 Gennadii Altukhov 2016-03-01 15:20:52 UTC
Taking...

Comment 2 Gennadii Altukhov 2016-03-01 16:53:01 UTC
spacewalk.git:
38b6aeda068f6ce2d4623804db51da17249ac589

Comment 3 Tomáš Kašpárek 2016-06-16 08:10:32 UTC
Spacewalk 2.5 was released.

Comment 4 Eric Herget 2017-09-28 18:06:37 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.