mirror of https://github.com/MISP/MISP
Merge remote-tracking branch 'origin/develop' into notes
commit
6f99b148f0
2
PyMISP
2
PyMISP
|
@ -1 +1 @@
|
||||||
Subproject commit 05beec393c5613c352dafdaeaf5dcf983bfb2d51
|
Subproject commit 492cfba2d2ad015d3fcda6e16c221fdefd93eca2
|
|
@ -34,7 +34,7 @@ class AppController extends Controller
|
||||||
public $helpers = array('OrgImg', 'FontAwesome', 'UserName');
|
public $helpers = array('OrgImg', 'FontAwesome', 'UserName');
|
||||||
|
|
||||||
private $__queryVersion = '159';
|
private $__queryVersion = '159';
|
||||||
public $pyMispVersion = '2.4.184';
|
public $pyMispVersion = '2.4.185';
|
||||||
public $phpmin = '7.2';
|
public $phpmin = '7.2';
|
||||||
public $phprec = '7.4';
|
public $phprec = '7.4';
|
||||||
public $phptoonew = '8.0';
|
public $phptoonew = '8.0';
|
||||||
|
|
|
@ -2403,11 +2403,15 @@ class Attribute extends AppModel
|
||||||
$timestamp[0] = $timestamp[1];
|
$timestamp[0] = $timestamp[1];
|
||||||
$timestamp[1] = $temp;
|
$timestamp[1] = $temp;
|
||||||
}
|
}
|
||||||
$conditions['AND'][] = array($scope . ' >=' => $timestamp[0]);
|
if ($timestamp[0] != 0) {
|
||||||
|
$conditions['AND'][] = array($scope . ' >=' => $timestamp[0]);
|
||||||
|
}
|
||||||
$conditions['AND'][] = array($scope . ' <=' => $timestamp[1]);
|
$conditions['AND'][] = array($scope . ' <=' => $timestamp[1]);
|
||||||
} else {
|
} else {
|
||||||
$timestamp = $this->resolveTimeDelta($timestamp);
|
$timestamp = $this->resolveTimeDelta($timestamp);
|
||||||
$conditions['AND'][] = array($scope . ' >=' => $timestamp);
|
if ($timestamp !== 0) {
|
||||||
|
$conditions['AND'][] = array($scope . ' >=' => $timestamp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($returnRaw) {
|
if ($returnRaw) {
|
||||||
return $timestamp;
|
return $timestamp;
|
||||||
|
|
|
@ -1102,8 +1102,12 @@ class Sighting extends AppModel
|
||||||
$conditions['Attribute.uuid'] = $filters['uuid'];
|
$conditions['Attribute.uuid'] = $filters['uuid'];
|
||||||
$contain[] = 'Attribute';
|
$contain[] = 'Attribute';
|
||||||
} elseif ($filters['context'] === 'event') {
|
} elseif ($filters['context'] === 'event') {
|
||||||
$conditions['Event.uuid'] = $filters['uuid'];
|
$temp = $this->Event->find('column', [
|
||||||
$contain[] = 'Event';
|
'recursive' => -1,
|
||||||
|
'fields' => ['Event.id'],
|
||||||
|
'conditions' => ['Event.uuid IN' => $filters['uuid']]
|
||||||
|
]);
|
||||||
|
$conditions['Sighting.event_id'] = empty($temp) ? -1 : $temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1131,15 +1135,30 @@ class Sighting extends AppModel
|
||||||
$tmpfile = new TmpFileTool();
|
$tmpfile = new TmpFileTool();
|
||||||
$tmpfile->write($exportTool->header($exportToolParams));
|
$tmpfile->write($exportTool->header($exportToolParams));
|
||||||
$separator = $exportTool->separator($exportToolParams);
|
$separator = $exportTool->separator($exportToolParams);
|
||||||
|
|
||||||
// fetch sightings matching the query without ACL checks
|
// fetch sightings matching the query without ACL checks
|
||||||
$sightingIds = $this->find('column', [
|
if (!empty($conditions['Sighting.event_id']) && is_array($conditions['Sighting.event_id'])) {
|
||||||
'conditions' => $conditions,
|
$conditions_copy = $conditions;
|
||||||
'fields' => ['Sighting.id'],
|
$sightingIds = [];
|
||||||
'contain' => $contain,
|
foreach ($conditions['Sighting.event_id'] as $e_id) {
|
||||||
'order' => 'Sighting.id',
|
$conditions_copy['Sighting.event_id'] = $e_id;
|
||||||
]);
|
$tempIds = $this->find('column', [
|
||||||
|
'conditions' => $conditions,
|
||||||
|
'fields' => ['Sighting.id'],
|
||||||
|
'contain' => $contain
|
||||||
|
]);
|
||||||
|
if (!empty($tempIds)) {
|
||||||
|
$sightingIds = array_merge($sightingIds, $tempIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$sightingIds = $this->find('column', [
|
||||||
|
'conditions' => $conditions,
|
||||||
|
'fields' => ['Sighting.id'],
|
||||||
|
'contain' => $contain
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
foreach (array_chunk($sightingIds, 500) as $chunk) {
|
foreach (array_chunk($sightingIds, 500) as $chunk) {
|
||||||
// fetch sightings with ACL checks and sighting policies
|
// fetch sightings with ACL checks and sighting policies
|
||||||
$sightings = $this->getSightings($user, $chunk, $includeEvent, $includeAttribute, $includeUuid);
|
$sightings = $this->getSightings($user, $chunk, $includeEvent, $includeAttribute, $includeUuid);
|
||||||
|
|
|
@ -10548,4 +10548,4 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"db_version": "122"
|
"db_version": "122"
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ misp-lib-stix2>=3.0.1.1
|
||||||
mixbox>=1.0.5
|
mixbox>=1.0.5
|
||||||
plyara>=2.1.1
|
plyara>=2.1.1
|
||||||
pydeep2>=0.5.1
|
pydeep2>=0.5.1
|
||||||
pymisp==2.4.184
|
pymisp==2.4.185
|
||||||
python-magic>=0.4.27
|
python-magic>=0.4.27
|
||||||
pyzmq>=25.1.1
|
pyzmq>=25.1.1
|
||||||
redis>=5.0.1
|
redis>=5.0.1
|
||||||
|
|
Loading…
Reference in New Issue