Exact match on the value when adding tag.

pull/111/head
Raphaël Vinot 2017-08-22 10:07:34 +02:00 committed by GitHub
parent ac72db8a48
commit 3c443095e8
1 changed files with 2 additions and 1 deletions

View File

@ -581,7 +581,8 @@ class MISPEvent(object):
def add_attribute_tag(self, tag, attribute_identifier):
attribute = None
for a in self.attributes:
if a.id == attribute_identifier or a.uuid == attribute_identifier or attribute_identifier in a.value:
if (a.id == attribute_identifier or a.uuid == attribute_identifier or
attribute_identifier == a.value or attribute_identifier in a.value.split('|')):
a.add_tag(tag)
attribute = a
if not attribute: