Bug 1313425 - Spacewalk produces invalid xmlrpc when transmitting ']]>' sequence
Summary: Spacewalk produces invalid xmlrpc when transmitting ']]>' sequence
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: API
Version: 2.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Gennadii Altukhov
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On: 681463
Blocks: 462714 space27
TreeView+ depends on / blocked
 
Reported: 2016-03-01 15:19 UTC by Gennadii Altukhov
Modified: 2017-09-28 18:06 UTC (History)
6 users (show)

Fixed In Version: redstone-xmlrpc-1.1_20071120-16
Clone Of: 681463
Environment:
Last Closed: 2016-06-16 08:10:32 UTC
Embargoed:


Attachments (Terms of Use)

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 ']]>', 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.


Note You need to log in before you can comment on or make changes to this bug.