Merge branch 'master' of https://github.com/arcsector/MISP-Taxii-Server
commit
ad1834acb2
|
@ -77,15 +77,18 @@ def post_stix(manager, content_block, collection_ids, service_id):
|
||||||
# make sure collections, if specified are supposed to be sent to
|
# make sure collections, if specified are supposed to be sent to
|
||||||
if CONFIG["misp"]["collections"] != "UNKNOWN" or CONFIG["misp"]["collections"] == False:
|
if CONFIG["misp"]["collections"] != "UNKNOWN" or CONFIG["misp"]["collections"] == False:
|
||||||
should_send_to_misp = False
|
should_send_to_misp = False
|
||||||
|
collection_names = [collection.name for collection in manager.get_collections(service_id)]
|
||||||
for collection in CONFIG["misp"]["collections"]:
|
for collection in CONFIG["misp"]["collections"]:
|
||||||
if collection in collection_ids:
|
if collection in collection_names or collection in collection_ids:
|
||||||
should_send_to_misp = True
|
should_send_to_misp = True
|
||||||
if should_send_to_misp == False:
|
if should_send_to_misp == False:
|
||||||
log.info('''No collections match misp.collections; aborting MISP extraction.
|
log.info('''No collections match misp.collections; aborting MISP extraction.
|
||||||
Collection ids whitelisted: {}
|
Collection ids whitelisted: {}
|
||||||
Collection ids sent to: {}'''.format(
|
Collection ids sent to: {}
|
||||||
|
Collection names sent to: {}'''.format(
|
||||||
CONFIG["misp"]["collections"],
|
CONFIG["misp"]["collections"],
|
||||||
collection_ids
|
collection_ids,
|
||||||
|
collection_names
|
||||||
))
|
))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue