mirror of https://github.com/MISP/MISP
fix: Critical fix to an issue with event add fixed
- a reuse of a pointer causes an invalid duplication of an attribute on entry, leading to the last attribute being droppedpull/1860/head
parent
a22abaa106
commit
48b57b0879
|
@ -1863,7 +1863,7 @@ class Event extends AppModel {
|
|||
unset($data['Event']['SharingGroup']);
|
||||
}
|
||||
if (isset($data['Event']['Attribute'])) {
|
||||
foreach ($data['Event']['Attribute'] as $k => &$a) {
|
||||
foreach ($data['Event']['Attribute'] as $k => $a) {
|
||||
unset($data['Event']['Attribute']['id']);
|
||||
if (isset($a['distribution']) && $a['distribution'] == 4) {
|
||||
$data['Event']['Attribute'][$k]['sharing_group_id'] = $this->SharingGroup->captureSG($data['Event']['Attribute'][$k]['SharingGroup'], $user);
|
||||
|
|
Loading…
Reference in New Issue