mirror of https://github.com/MISP/MISP
chg: [feed] Modify value when checking if value exists in current event
parent
47d32a46f4
commit
d91a42d6b9
|
@ -963,6 +963,15 @@ class Feed extends AppModel
|
|||
if (isset($existsAttributesValueToId[$dataPoint['value']])) {
|
||||
unset($data[$k]);
|
||||
unset($existsAttributesValueToId[$dataPoint['value']]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Because some types can be saved in modified version (for example, IPv6 address is convert to compressed
|
||||
// format, we should also check if current event contains modified value.
|
||||
$modifiedValue = $this->Event->Attribute->modifyBeforeValidation($dataPoint['type'], $dataPoint['value']);
|
||||
if (isset($existsAttributesValueToId[$modifiedValue])) {
|
||||
unset($data[$k]);
|
||||
unset($existsAttributesValueToId[$modifiedValue]);
|
||||
}
|
||||
}
|
||||
if ($feed['Feed']['delta_merge'] && !empty($existsAttributesValueToId)) {
|
||||
|
|
Loading…
Reference in New Issue