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

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

View File

@ -732,7 +732,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

@ -200,7 +200,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

@ -468,7 +468,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;