-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EmailMessageObj:Header/Sender causes error (in 1.1.1.1 and 1.1.1.2) #215
Comments
As best I can tell, this is due to some weirdness with the EmailAddress class being used in this field. It appears to be happening because the sender field is being set twice in
The following change (for https://github.com/CybOXProject/python-cybox/blob/master/cybox/__init__.py#L195) seemed to fix it, but @gtback should probably verify :) if not getattr(entity, field.attr_name):
setattr(entity, field.attr_name, val) |
I think |
Yeah, any field that uses the |
I can reproduce this. I'm not sure why it's happening, but I agree it's probably related to the The point of the I noticed that by adding
|
@gtback speaking of unintended consequences, I just found a fairly significant one with my proposed approach in conjunction with the parsing of MAEC content with def __init__(self, id = None, malware_instance_object_attributes = None):
super(MalwareSubject, self).__init__()
if id:
self.id_ = id
else:
self.id_ = maec.utils.idgen.create_id(prefix="malware_subject") |
input.xml
script.py
error
The text was updated successfully, but these errors were encountered: