intelmq
intelmq copied to clipboard
Sieve bot: comparision values are not sanitized leading to unexpected behavior
If you write:
if source.asn == '64496'
it will never match. You need to write:
if source.asn == 64496
as "64496" == 64496) equals to false in Python. This is not JavaScript :)
To fix this, the sieve bot could sanitize the comparison value. In this example, "64496" results in an integer then, and the comparison succeeds.