[openioc] Allow the use of types in openioc content tags

pull/409/head
0x3c7 2019-06-18 16:10:20 +02:00
parent 409ee532ba
commit efd8b80adb
No known key found for this signature in database
GPG Key ID: EFBE1131B58AFF51
1 changed files with 5 additions and 1 deletions

View File

@ -218,7 +218,11 @@ def set_values(value1, value2=None):
compositeMapping = '{}|{}'.format(value1.find('context')['search'], value2.find('context')['search'])
mapping = get_mapping(compositeMapping, mappingDict=iocMispCompositeMapping)
else:
mapping = get_mapping(value1.find('context')['search'])
content_type = value1.find('content').get('type', None)
if content_type:
mapping = get_mapping(value1.find('context')['search'] + '/' + content_type)
else:
mapping = get_mapping(value1.find('context')['search'])
if mapping:
attribute_values.update(mapping)