PyMISP icon indicating copy to clipboard operation
PyMISP copied to clipboard

published=False returns published events

Open sbjzn opened this issue 1 year ago • 2 comments

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",
    )

sbjzn avatar Jul 02 '24 08:07 sbjzn

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

Rafiot avatar Jul 02 '24 15:07 Rafiot

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

sbjzn avatar Jul 02 '24 15:07 sbjzn