CybOXProject / python-cybox

A Python library for parsing, manipulating, and generating CybOX content.

Home Page:http://cybox.readthedocs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XSI_TYPE in vocabs not serialized due to logical error

emmanvg opened this issue · comments

https://github.com/CybOXProject/python-cybox/blob/master/cybox/common/vocabs.py#L123
Note the right-hand side of the OR expression will return True if an XSI_TYPE and xsi_type is set making self.is_plain() return True which is False...

It affects to_dict() because it makes use of it, but it can also affect the general code logic when used outside.

Can we add a test that demonstrates this? I remember why we made is_plain(), but I don't really understand the implications of this change.