crowdsec
crowdsec copied to clipboard
Bug/Local API: `include_scenarios_containing` works only for the latest decision
Describe the bug
Currently, when we have multiple decisions concerning an IP address (with different scenarios), and when we query the local API to get decisions with scenarios_containing, it will returns the IP address only if the decisions with the longest duration match the scenario filter.
To Reproduce
cscli decisions add -i 1.2.3.4 --reason testcscli decisions add -i 1.2.3.4 --reason test1234- Query the local API with
scenarios_containing=testand you will not receive decisions from the local API
Expected behavior Getting the decisions whatever the decision duration
Technical Information (please complete the following information):
- Version: v1.3.4