Closed mdhoang closed 8 years ago
The same error in stix/common/vocabs.py
Value must be one of ('Indicators - Phishing', 'Indicators', 'Incident', 'Threat Report', 'Campaign Characterization', 'Threat Actor Characterization', 'TTP - Infrastructure', 'Courses of Action', 'Attack Pattern Characterization', 'Indicators - Malware Artifacts', 'Malware Characterization', 'TTP - Tools', 'Observations - Email', 'Indicators - Network Activity', 'Indicators - Watchlist', 'Exploit Characterization', 'Malware Samples', 'Collective Threat Intelligence', 'Indicators - Endpoint Characteristics', 'Observations'). Received 'Indicators - Network Activity
'
Thanks, @mdhoang!
I realize that this is a pretty easy fix in Python, but including whitespace around vocabulary values technically makes the STIX XML invalid (according to both oXygen and stix-validator), so I would recommend bringing up this issue with whoever produced the STIX document.
I understand that practicality is also important, so let me know if this causes any problems. Feel free to re-open this.
I got a stix xml with lines like this:
When trying to do stix.core.STIXPackage.from_xml(file_name), there was an error raised.
I tried add on line 84
and it works. But I don't know if this is a proper fix, and would like this error to be fixed properly for everyone.
Thank you.