mirror of https://github.com/MISP/MISP
fix: [enrichment] Encrypting attribute data if encrypt field is set
parent
be339c2dff
commit
d7695708cd
|
@ -6191,6 +6191,9 @@ class Event extends AppModel
|
|||
if (empty($attribute['comment'])) {
|
||||
$attribute['comment'] = $default_comment;
|
||||
}
|
||||
if (!empty($attribute['data']) && !empty($attribute['encrypt'])) {
|
||||
$attribute = $this->Attribute->onDemandEncrypt($attribute);
|
||||
}
|
||||
$attribute['event_id'] = $id;
|
||||
if ($this->Attribute->save($attribute)) {
|
||||
$saved_attributes++;
|
||||
|
@ -6490,6 +6493,9 @@ class Event extends AppModel
|
|||
if (empty($attribute['comment'])) {
|
||||
$attribute['comment'] = $default_comment;
|
||||
}
|
||||
if (!empty($attribute['data']) && !empty($attribute['encrypt'])) {
|
||||
$attribute = $this->Attribute->onDemandEncrypt($attribute);
|
||||
}
|
||||
$this->Attribute->create();
|
||||
$attribute_save = $this->Attribute->save($attribute);
|
||||
if ($attribute_save) {
|
||||
|
|
Loading…
Reference in New Issue