fix: [attribute:first_seen/last_seen] First seen value can be equal to the last_seen value.

Fix #7404
pull/7405/head
mokaddem 2021-05-11 11:22:19 +02:00
parent f48eb4131b
commit 25cb3942d7
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
3 changed files with 3 additions and 3 deletions

View File

@ -733,7 +733,7 @@ class Attribute extends AppModel
'first_seen' => $this->data['Attribute']['first_seen'],
'last_seen' => $ls
]], 'Attribute');
if ($converted['Attribute']['first_seen'] >= $converted['Attribute']['last_seen']) {
if ($converted['Attribute']['first_seen'] > $converted['Attribute']['last_seen']) {
return false;
}
return true;

View File

@ -227,7 +227,7 @@ class MispObject extends AppModel
'first_seen' => $this->data['Object']['first_seen'],
'last_seen' => $ls
]], 'Object');
if ($converted['Object']['first_seen'] >= $converted['Object']['last_seen']) {
if ($converted['Object']['first_seen'] > $converted['Object']['last_seen']) {
return false;
}
return true;

View File

@ -469,7 +469,7 @@ class ShadowAttribute extends AppModel
'first_seen' => $this->data['ShadowAttribute']['first_seen'],
'last_seen' => $ls
]], 'ShadowAttribute');
if ($converted['ShadowAttribute']['first_seen'] >= $converted['ShadowAttribute']['last_seen']) {
if ($converted['ShadowAttribute']['first_seen'] > $converted['ShadowAttribute']['last_seen']) {
return false;
}
return true;