Skip to content

fix: Correct isBlacklisted() return logic in OTX module#758

Merged
adulau merged 1 commit intoMISP:mainfrom
Dysnome:fix-otx-blacklist-logic
Feb 3, 2026
Merged

fix: Correct isBlacklisted() return logic in OTX module#758
adulau merged 1 commit intoMISP:mainfrom
Dysnome:fix-otx-blacklist-logic

Conversation

@Dysnome
Copy link
Contributor

@Dysnome Dysnome commented Jan 27, 2026

Description

Fixed a bug in the OTX module where the isBlacklisted() function had inverted return values, preventing the module from returning valid enrichment results.

Issue

The isBlacklisted() function returned False when a value was found in the blacklist and True when not found. This caused all non-blacklisted results to be filtered out across the entire module.

Impact

  • IP address passive DNS enrichment returned empty results
  • Hash malware domain lookups returned empty results
  • Domain enrichment returned incomplete results

Changes

Corrected the isBlacklisted() function return values:

  • Now returns True when value is found in blacklist (was False)
  • Now returns False when value is not in blacklist (was True)

Testing

Tested with IP address 193.24.123.207 using the OTX API. Confirmed that passive DNS hostnames are now correctly returned instead of empty results.

Example

Before fix: {"results": []}
After fix: Returns 100+ passive DNS hostnames associated with the IP

fix: Correct inverted return values in isBlacklisted() function

The isBlacklisted() function had inverted logic - it returned False when
a value was found in the blacklist and True when not found. This caused
all non-blacklisted results to be filtered out throughout the module.

Fixed by correcting the return values:
- Returns True when value is found in blacklist (was False)
- Returns False when value is not in blacklist (was True)

This fixes enrichment failures in:
- IP passive DNS lookups (getIP function)
- Hash malware domain lookups (getHash function)
- Domain enrichment (getDomain function)

Tested with IP address passive DNS enrichment and confirmed hostnames
are now returned correctly from the OTX API.
@adulau adulau merged commit 8df6f28 into MISP:main Feb 3, 2026
5 checks passed
@adulau
Copy link
Member

adulau commented Feb 3, 2026

Good catch. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants