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');
|
||||
|
||||
private $__queryVersion = '159';
|
||||
public $pyMispVersion = '2.4.184';
|
||||
public $pyMispVersion = '2.4.185';
|
||||
public $phpmin = '7.2';
|
||||
public $phprec = '7.4';
|
||||
public $phptoonew = '8.0';
|
||||
|
|
|
@ -2403,12 +2403,16 @@ class Attribute extends AppModel
|
|||
$timestamp[0] = $timestamp[1];
|
||||
$timestamp[1] = $temp;
|
||||
}
|
||||
if ($timestamp[0] != 0) {
|
||||
$conditions['AND'][] = array($scope . ' >=' => $timestamp[0]);
|
||||
}
|
||||
$conditions['AND'][] = array($scope . ' <=' => $timestamp[1]);
|
||||
} else {
|
||||
$timestamp = $this->resolveTimeDelta($timestamp);
|
||||
if ($timestamp !== 0) {
|
||||
$conditions['AND'][] = array($scope . ' >=' => $timestamp);
|
||||
}
|
||||
}
|
||||
if ($returnRaw) {
|
||||
return $timestamp;
|
||||
}
|
||||
|
|
|
@ -1102,8 +1102,12 @@ class Sighting extends AppModel
|
|||
$conditions['Attribute.uuid'] = $filters['uuid'];
|
||||
$contain[] = 'Attribute';
|
||||
} elseif ($filters['context'] === 'event') {
|
||||
$conditions['Event.uuid'] = $filters['uuid'];
|
||||
$contain[] = 'Event';
|
||||
$temp = $this->Event->find('column', [
|
||||
'recursive' => -1,
|
||||
'fields' => ['Event.id'],
|
||||
'conditions' => ['Event.uuid IN' => $filters['uuid']]
|
||||
]);
|
||||
$conditions['Sighting.event_id'] = empty($temp) ? -1 : $temp;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1133,12 +1137,27 @@ class Sighting extends AppModel
|
|||
$separator = $exportTool->separator($exportToolParams);
|
||||
|
||||
// fetch sightings matching the query without ACL checks
|
||||
if (!empty($conditions['Sighting.event_id']) && is_array($conditions['Sighting.event_id'])) {
|
||||
$conditions_copy = $conditions;
|
||||
$sightingIds = [];
|
||||
foreach ($conditions['Sighting.event_id'] as $e_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,
|
||||
'order' => 'Sighting.id',
|
||||
'contain' => $contain
|
||||
]);
|
||||
}
|
||||
|
||||
foreach (array_chunk($sightingIds, 500) as $chunk) {
|
||||
// fetch sightings with ACL checks and sighting policies
|
||||
|
|
|
@ -6,7 +6,7 @@ misp-lib-stix2>=3.0.1.1
|
|||
mixbox>=1.0.5
|
||||
plyara>=2.1.1
|
||||
pydeep2>=0.5.1
|
||||
pymisp==2.4.184
|
||||
pymisp==2.4.185
|
||||
python-magic>=0.4.27
|
||||
pyzmq>=25.1.1
|
||||
redis>=5.0.1
|
||||
|
|
Loading…
Reference in New Issue