mirror of https://github.com/MISP/MISP
Fixes a bug on invalid event IDs passed to the STIX export causing long execution times, fixes #747
- Running a stix export for a specific ID that doesn't exist results in a full STIX export for the user (events visible to the user) - This leads for an unnecesarily long export process when a quick export is expectedpull/796/head v2.4.2
parent
66a90cd60c
commit
9e3e362ea6
|
@ -1 +1 @@
|
|||
{"major":2, "minor":4, "hotfix":1}
|
||||
{"major":2, "minor":4, "hotfix":2}
|
||||
|
|
|
@ -2342,6 +2342,7 @@ class Event extends AppModel {
|
|||
$eventIDs = $this->Attribute->dissectArgs($id);
|
||||
$tagIDs = $this->Attribute->dissectArgs($tags);
|
||||
$idList = $this->getAccessibleEventIds($eventIDs[0], $eventIDs[1], $tagIDs[0], $tagIDs[1]);
|
||||
if (empty($idList)) throw new Exception('No matching events found to export.');
|
||||
$events = $this->fetchEvent($user, array('idList' => $idList, 'last' => $last, 'from' => $from, 'last' => $last));
|
||||
if (empty($events)) throw new Exception('No matching events found to export.');
|
||||
|
||||
|
|
Loading…
Reference in New Issue