mirror of https://github.com/MISP/MISP
fix: wrong attribute value hash computed inside checkForDuplicateObjects function
Signed-off-by: Sebastiano Mariani <smariani@vmware.com>pull/7551/head
parent
0c25b72072
commit
c51ef9da8e
|
@ -365,9 +365,13 @@ class MispObject extends AppModel
|
|||
$attribute['value'] = $attribute['value'] . '|' . md5(base64_decode($attribute['data']));
|
||||
}
|
||||
}
|
||||
|
||||
$attributeValueAfterModification = $this->Attribute->modifyBeforeValidation($attribute['type'], $attribute['value']);
|
||||
$attributeValueAfterModification = $this->Attribute->runRegexp($attribute['type'], $attributeValueAfterModification);
|
||||
|
||||
$newObjectAttributes[] = hash(
|
||||
'sha256',
|
||||
$attribute['object_relation'] . $attribute['category'] . $attribute['type'] . $this->Attribute->modifyBeforeValidation($attribute['type'], $attribute['value'])
|
||||
$attribute['object_relation'] . $attribute['category'] . $attribute['type'] . $attributeValueAfterModification
|
||||
);
|
||||
}
|
||||
$newObjectAttributeCount = count($newObjectAttributes);
|
||||
|
|
Loading…
Reference in New Issue