From 3c443095e80031a181dc1d9a05ae81218dfed997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Tue, 22 Aug 2017 10:07:34 +0200 Subject: [PATCH] Exact match on the value when adding tag. --- pymisp/mispevent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pymisp/mispevent.py b/pymisp/mispevent.py index b022052..a1428ea 100644 --- a/pymisp/mispevent.py +++ b/pymisp/mispevent.py @@ -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: