mirror of https://github.com/MISP/MISP
fix: [correlation] Fix over correlating value
parent
a09721292e
commit
332264fe9d
|
@ -43,9 +43,10 @@ class OverCorrelatingValue extends AppModel
|
|||
public function block($value)
|
||||
{
|
||||
if (!$this->isBlocked($value)) {
|
||||
$value = self::truncate($value);
|
||||
$this->create();
|
||||
$this->save([
|
||||
'value' => self::truncate($value),
|
||||
'value' => $value,
|
||||
'occurrence' => 0
|
||||
]);
|
||||
$this->blockedValues[$value] = true;
|
||||
|
@ -58,12 +59,10 @@ class OverCorrelatingValue extends AppModel
|
|||
*/
|
||||
public function unblock($value)
|
||||
{
|
||||
$this->deleteAll(
|
||||
[
|
||||
'OverCorrelatingValue.value' => self::truncate($value)
|
||||
],
|
||||
false
|
||||
);
|
||||
$value = self::truncate($value);
|
||||
$this->deleteAll([
|
||||
'OverCorrelatingValue.value' => $value,
|
||||
], false);
|
||||
$this->blockedValues[$value] = false;
|
||||
}
|
||||
|
||||
|
@ -126,10 +125,8 @@ class OverCorrelatingValue extends AppModel
|
|||
true,
|
||||
$jobId
|
||||
);
|
||||
|
||||
return $jobId;
|
||||
} else {
|
||||
return $this->generateOccurrences();
|
||||
$this->generateOccurrences();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue