Description of problem: I have noticed the problem on this particular bug >>> from bugzilla import Bugzilla >>> BugzillaXmlrpc = 'https://bugzilla.redhat.com/xmlrpc.cgi' >>> bugzilla = Bugzilla(url=BugzillaXmlrpc) >>> bugzilla._proxy.Bug.history({'ids':[1614166]}) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.7/xmlrpclib.py", line 1233, in __call__ return self.__send(self.__name, args) File "/usr/lib/python2.7/site-packages/bugzilla/_backendxmlrpc.py", line 138, in _ServerProxy__request ret = ServerProxy._ServerProxy__request(self, methodname, params) File "/usr/lib64/python2.7/xmlrpclib.py", line 1591, in __request verbose=self.__verbose File "/usr/lib/python2.7/site-packages/bugzilla/_backendxmlrpc.py", line 106, in request return self.__request_helper(url, request_body) File "/usr/lib/python2.7/site-packages/bugzilla/_backendxmlrpc.py", line 69, in __request_helper raise e bugzilla.exceptions.BugzillaError: not well-formed (invalid token): line 6, column 0 Leos Pol did some debugging of the issue and identified that the issue is in comment 13, specifically character right after the first "ll" command. There is a sequence of (0x0A) (0x03) (0x0A). 0x0As are \n, 0x03 Ctrl+C. When the commenter copied the terminal output, he also copied it with ctrl+c. Something like this has to be escaped and not break XML traffic. Version 5.0.4rh53
Technically it cannot be escaped in XML 1.0. The character is simply not allowed there. It can either be replaced with a different character (e.g. U+FFFD) or a well-known textual representation (^C), or the XML version must be upgraded to XML 1.1.
There is already a function to do this, it probably just needs to be added to another place. e.g. if you call Bug.get and get all the comments it should not trigger this issue.
1. fetch bug history for 1614166 using XMLRPC $ perl bug_1933606.pl ... [root@d shm]# pwd /dev/shm [root@d shm]# ll [root@d ...
This change is now live. If there are any issues, do not reopen this bug. Instead, you should create a new bug and reference this bug.