mirror of https://github.com/MISP/MISP
minor NIDS export performance improvement
parent
58f72ab4d1
commit
00d8d24434
|
@ -405,7 +405,7 @@ class NidsExportComponent extends Component {
|
|||
foreach ($explodedNames as &$explodedName) {
|
||||
// count the lenght of the part, and add |length| before
|
||||
$length = strlen($explodedName);
|
||||
if ($length > 255) exit('ERROR: dns name is to long for RFC'); // LATER log correctly without dying
|
||||
if ($length > 255) $this->log('WARNING: dns name is to long for RFC: '.$name);
|
||||
$hexLength = dechex($length);
|
||||
if (1 == strlen($hexLength)) $hexLength = '0' . $hexLength;
|
||||
$rawName .= '|' . $hexLength . '|' . $explodedName;
|
||||
|
|
|
@ -1468,6 +1468,7 @@ class EventsController extends AppController {
|
|||
'recursive' => 0, //int
|
||||
'group' => array('Attribute.type', 'Attribute.value1'), //fields to GROUP BY
|
||||
);
|
||||
unset($this->Attribute->virtualFields['category_order']); // not needed for IDS export and speeds things up
|
||||
$items = $this->Attribute->find('all', $params);
|
||||
|
||||
$rules = $this->NidsExport->export($items, $user['User']['nids_sid']);
|
||||
|
|
Loading…
Reference in New Issue