mirror of https://github.com/MISP/MISP
fix: [taxii_push] Passing standard MISP JSON format to the `taxii_push` script and by extension to misp-stix
parent
54d8d1fe79
commit
00f09cefbe
|
@ -4,6 +4,8 @@ App::uses('EncryptedValue', 'Tools');
|
|||
App::uses('Folder', 'Utility');
|
||||
App::uses('File', 'Utility');
|
||||
App::uses('RandomTool', 'Tools');
|
||||
App::uses('JSONConverterTool', 'Tools');
|
||||
App::uses('JsonTool', 'Tools');
|
||||
|
||||
class TaxiiServer extends AppModel
|
||||
{
|
||||
|
@ -101,7 +103,11 @@ class TaxiiServer extends AppModel
|
|||
$this->Job->id = $jobId;
|
||||
foreach ($result as $event) {
|
||||
$temporaryFile = $this->temporaryFile($temporaryFolderPath);
|
||||
$temporaryFile->write(json_encode($event));
|
||||
$temporaryFile->write(
|
||||
JsonTool::encode(
|
||||
JSONConverterTool::convert($event, false, true)
|
||||
)
|
||||
);
|
||||
$temporaryFile->close();
|
||||
if ($jobId && $i % 10 == 0) {
|
||||
$this->Job->saveField('progress', intval((100 * $i) / $eventCount));
|
||||
|
|
Loading…
Reference in New Issue