Fix otx threat names ids not populating #99
Merged
Conversation
@@ -39,9 +40,10 @@ private OTXLookupResult lookupIntel(final String key, final LookupTableService.F | |||
|
|||
if (pulseCount > 0) { | |||
result.put("otx_threat_indicated", true); | |||
if (lookupResult.multiValue() != null && lookupResult.multiValue() instanceof List) { | |||
if (lookupResult.multiValue() != null && lookupResult.multiValue() instanceof LinkedHashMap) { |
joschi
Mar 16, 2018
Contributor
Why did you decide to use a LinkedHashMap
instead of the List
interface?
Why did you decide to use a LinkedHashMap
instead of the List
interface?
pbr0ck3r
Mar 16, 2018
•
Author
Contributor
The lookupResult.multiValue()
is a instance of LinkedHashMap
not List
which was causing this check in the if statement
to fail.
The lookupResult.multiValue()
is a instance of LinkedHashMap
not List
which was causing this check in the if statement
to fail.
joschi
Mar 16, 2018
Contributor
Ah, it's a map and not a list! 🤦♂️
In this case, please use the Map
interface and not List
or LinkedHashMap
.
Ah, it's a map and not a list!
In this case, please use the Map
interface and not List
or LinkedHashMap
.
pbr0ck3r
Mar 16, 2018
•
Author
Contributor
Wiil do! Original reason I choose LindkedHashMap
was because I checked the class of lookupResult.mulitValue()
using getClass()
and it returned LinkdedHashMap
.
Wiil do! Original reason I choose LindkedHashMap
was because I checked the class of lookupResult.mulitValue()
using getClass()
and it returned LinkdedHashMap
.
LGTM. |
joschi
pushed a commit
that referenced
this pull request
Mar 16, 2018
Fix otx_threat_names and otx_threat_ids not populating in lookupIntel when they exist (cherry picked from commit f771037)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
When using the
otx_lookup_ip
andotx_lookup_domain
in a pipeline rule. All that was being passed back wasotx_threat_indicated
. If a threat was indicatedotx_threat_ids
andotx_threat_names
are currently not being returned. Justotx_threat_indicated: true
. This PR fixes that.