MISP / PyMISP

Python library using the MISP Rest API
Other
444 stars 279 forks source link

published=False returns published events #1249

Open sbjzn opened 4 months ago

sbjzn commented 4 months ago

PyMISP version: 2.4.194

The following code returns events that are published, even though published=False is specified.

misp = PyMISP(url=misp_url, key=misp_key, ssl=misp_ssl)
misp.global_pythonify = True

uuid = redacted-uuid
misp.search(
        controller="events",
        org=uuid,
        published=False,
        date_from="2024-01-01",
    )
Rafiot commented 4 months ago

Just making sure: you're getting both unpublished and published events, right?

This test is checking that, but there are no published events at all, so it's not gonna catch a bug where they're both returned: https://github.com/MISP/PyMISP/blob/main/tests/testlive_comprehensive.py#L864

sbjzn commented 4 months ago

Correct, I am getting both published and unpublished events returned.