Closed 0xThiebaut closed 1 year ago
Right, the logic in that method was pretty bad. I fixed that. Data being an empty Iterator isn't great, but it is possibly an expected request, so I'd rather not just drop the request all together.
Thank you for the report!
Invoking
misp.values_in_warninglist([])
(e.g. when the values are dynamically generated) throws anUnboundLocalError
as the following condition does not defined
whendata
is considered Falsy. Ideally,values_in_warninglist
should return without API call when provided a Falsy input.https://github.com/MISP/PyMISP/blob/69e660ef03108cc16a52b170e7ab4440bd202520/pymisp/api.py#L3712-L3722