Merge pull request #528 from chisholm/fix_taxii_filters

Fix transformation from Filter object to TAXII filter
pull/1/head
Rich Piazza 2021-09-10 09:14:16 -04:00 committed by GitHub
commit 34128d17b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -343,8 +343,8 @@ class TAXIICollectionSource(DataSource):
For instance - "?match[type]=indicator,sighting" can be in a
filter in any of these formats:
Filter("type", "<any op>", "indicator,sighting")
Filter("type", "<any op>", ["indicator", "sighting"])
Filter("type", "=", "indicator,sighting")
Filter("type", "=", ["indicator", "sighting"])
Args:
query (list): list of filters to extract which ones are TAXII
@ -357,7 +357,7 @@ class TAXIICollectionSource(DataSource):
taxii_filters = []
for filter_ in query:
if filter_.property in TAXII_FILTERS:
if filter_.property in TAXII_FILTERS and filter_.op == "=":
taxii_filters.append(filter_)
return taxii_filters