mirror of https://github.com/MISP/MISP
chg: [correlation] Do not delete over correlation if no correlation found
parent
cb365a070f
commit
c0017a0531
|
@ -363,7 +363,7 @@ class Correlation extends AppModel
|
|||
// If we have more correlations for the value than the limit, set the block entry and stop the correlation process
|
||||
$this->OverCorrelatingValue->block($cV);
|
||||
return true;
|
||||
} else {
|
||||
} else if ($count !== 0) {
|
||||
// If we have fewer hits than the limit, proceed with the correlation, but first make sure we remove any existing blockers
|
||||
$this->OverCorrelatingValue->unblock($cV);
|
||||
}
|
||||
|
|
|
@ -94,12 +94,11 @@ class OverCorrelatingValue extends AppModel
|
|||
|
||||
public function findOverCorrelatingValues(array $values_to_check): array
|
||||
{
|
||||
$values_to_check_truncated = array_unique(self::truncateValues($values_to_check));
|
||||
$overCorrelatingValues = $this->find('column', [
|
||||
$values_to_check_truncated = array_unique(self::truncateValues($values_to_check), SORT_REGULAR);
|
||||
return $this->find('column', [
|
||||
'conditions' => ['value' => $values_to_check_truncated],
|
||||
'fields' => ['value'],
|
||||
]);
|
||||
return $overCorrelatingValues;
|
||||
}
|
||||
|
||||
public function generateOccurrencesRouter()
|
||||
|
|
Loading…
Reference in New Issue