fix: [stix 1/2 import] Adding misp event json data within the 'Event' field if it is not already in

pull/5259/head
chrisr3d 2019-09-28 01:46:06 +02:00
parent d0b99bebda
commit 6239738192
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 3 additions and 0 deletions

View File

@ -5844,6 +5844,9 @@ class Event extends AppModel
if (trim($result) == '1') {
$data = file_get_contents($output_path);
$data = json_decode($data, true);
if (empty($data['Event'])) {
$data = array('Event' => $data);
}
unlink($output_path);
$created_id = false;
$validationIssues = false;