Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

[2.0.0] xml errors in the log #169

Closed
tuxmaster5000 opened this issue Nov 1, 2019 · 2 comments
Closed

[2.0.0] xml errors in the log #169

tuxmaster5000 opened this issue Nov 1, 2019 · 2 comments

Comments

@tuxmaster5000
Copy link

I often see this error message in the log:

journal: OSPD - openvas: ERROR: (ospd.ospd) While handling client command:#012Traceback (most recent call last):#12 File "/usr/lib/python3.6/site-packages/ospd/ospd.py", line 762, in handle_client_stream#012 response = self.handle_command(data)#12 File "/usr/lib/python3.6/site-packages/ospd/ospd.py", line 1624, in handle_command#012 return self.handle_get_vts_command(tree)#12 File "/usr/lib/python3.6/site-packages/ospd/ospd.py", line 1011, in handle_get_vts_command#012 vts_xml = self.get_vts_xml(vt_id, filtered_vts)#12 File "/usr/lib/python3.6/site-packages/ospd/ospd.py", line 1545, in get_vts_xml#012 vts_xml.append(self.get_vt_xml(vt_id))#12 File "/usr/lib/python3.6/site-packages/ospd/ospd.py", line 1487, in get_vt_xml#012 vt_id, vt.get('affected')#12 File "/usr/lib/python3.6/site-packages/ospd_openvas/daemon.py", line 684, in get_affected_vt_as_xml_str#012 _affected.text = affected#012 File "src/lxml/etree.pyx", line 1018, in lxml.etree._Element.text.set#12 File "src/lxml/apihelpers.pxi", line 710, in lxml.etree._setNodeText#012 File "src/lxml/apihelpers.pxi", line 698, in lxml.etree._createTextNode#012 File "src/lxml/apihelpers.pxi", line 1493, in lxml.etree._utf8#012ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters

@cfi-gb
Copy link
Member

cfi-gb commented Nov 1, 2019

Thanks for your report. This message was caused by a single VT added to the feed recently which had a special control char in the "affected" tag. This special char has already been removed and the updated VT should be included in one of the next feed updates, in addition the ospd-openvas is getting improved to handle such special chars more gracefully:

greenbone/ospd-openvas#138

@jjnicola
Copy link
Member

jjnicola commented Nov 4, 2019

PR greenbone/ospd-openvas#139 fix this issue.

@jjnicola jjnicola closed this as completed Nov 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants