mirror of https://github.com/MISP/MISP
chg: [cleanup] Removed duplicate capture field definitions
parent
273af898ce
commit
49d78bea32
|
@ -80,6 +80,25 @@ class Attribute extends AppModel
|
||||||
'ip-dst|port'
|
'ip-dst|port'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public $captureFields = array(
|
||||||
|
'event_id',
|
||||||
|
'category',
|
||||||
|
'type',
|
||||||
|
'value',
|
||||||
|
'value1',
|
||||||
|
'value2',
|
||||||
|
'to_ids',
|
||||||
|
'uuid',
|
||||||
|
'timestamp',
|
||||||
|
'distribution',
|
||||||
|
'comment',
|
||||||
|
'sharing_group_id',
|
||||||
|
'deleted',
|
||||||
|
'disable_correlation',
|
||||||
|
'object_id',
|
||||||
|
'object_relation'
|
||||||
|
);
|
||||||
|
|
||||||
public $searchResponseTypes = array(
|
public $searchResponseTypes = array(
|
||||||
'xml' => array(
|
'xml' => array(
|
||||||
'type' => 'xml',
|
'type' => 'xml',
|
||||||
|
@ -3275,24 +3294,7 @@ class Attribute extends AppModel
|
||||||
if (isset($attribute['encrypt'])) {
|
if (isset($attribute['encrypt'])) {
|
||||||
$result = $this->handleMaliciousBase64($eventId, $attribute['value'], $attribute['data'], array('md5'));
|
$result = $this->handleMaliciousBase64($eventId, $attribute['value'], $attribute['data'], array('md5'));
|
||||||
}
|
}
|
||||||
$fieldList = array(
|
$fieldList = $this->captureFields;
|
||||||
'event_id',
|
|
||||||
'category',
|
|
||||||
'type',
|
|
||||||
'value',
|
|
||||||
'value1',
|
|
||||||
'value2',
|
|
||||||
'to_ids',
|
|
||||||
'uuid',
|
|
||||||
'timestamp',
|
|
||||||
'distribution',
|
|
||||||
'comment',
|
|
||||||
'sharing_group_id',
|
|
||||||
'deleted',
|
|
||||||
'disable_correlation',
|
|
||||||
'object_id',
|
|
||||||
'object_relation'
|
|
||||||
);
|
|
||||||
$this->create();
|
$this->create();
|
||||||
if (!isset($attribute['distribution'])) {
|
if (!isset($attribute['distribution'])) {
|
||||||
$attribute['distribution'] = Configure::read('MISP.default_attribute_distribution');
|
$attribute['distribution'] = Configure::read('MISP.default_attribute_distribution');
|
||||||
|
|
|
@ -2690,22 +2690,7 @@ class Event extends AppModel
|
||||||
'disable_correlation',
|
'disable_correlation',
|
||||||
'extends_uuid'
|
'extends_uuid'
|
||||||
),
|
),
|
||||||
'Attribute' => array(
|
'Attribute' => $this->Attribute->captureFields,
|
||||||
'event_id',
|
|
||||||
'category',
|
|
||||||
'type',
|
|
||||||
'value',
|
|
||||||
'to_ids',
|
|
||||||
'uuid',
|
|
||||||
'timestamp',
|
|
||||||
'distribution',
|
|
||||||
'comment',
|
|
||||||
'sharing_group_id',
|
|
||||||
'deleted',
|
|
||||||
'disable_correlation',
|
|
||||||
'object_id',
|
|
||||||
'object_relation'
|
|
||||||
),
|
|
||||||
'Object' => array(
|
'Object' => array(
|
||||||
'name',
|
'name',
|
||||||
'meta-category',
|
'meta-category',
|
||||||
|
|
Loading…
Reference in New Issue