From 8594d2ab4730308d177d96948bff8f4d2f59afd2 Mon Sep 17 00:00:00 2001 From: iglocska Date: Fri, 17 Mar 2023 15:25:40 +0100 Subject: [PATCH 1/2] fix: [Galaxy index search] fixed - seems to be using the Cerebrate format rather than MISP? --- app/Controller/GalaxiesController.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/Controller/GalaxiesController.php b/app/Controller/GalaxiesController.php index edb500e27..0f7cd4efc 100644 --- a/app/Controller/GalaxiesController.php +++ b/app/Controller/GalaxiesController.php @@ -22,8 +22,16 @@ class GalaxiesController extends AppController public function index() { $aclConditions = array(); - $filters = $this->IndexFilter->harvestParameters(array('value', 'enabled')); - $searchConditions = array(); + $filterData = array( + 'request' => $this->request, + 'named_params' => $this->params['named'], + 'paramArray' => ['value', 'enabled'], + 'ordered_url_params' => [], + 'additional_delimiters' => PHP_EOL + ); + $exception = false; + $filters = $this->_harvestParameters($filterData, $exception); + $searchConditions = []; if (empty($filters['value'])) { $filters['value'] = ''; } else { From aa9dffb03fb109f73120c2b22e89e04729d5ca83 Mon Sep 17 00:00:00 2001 From: iglocska Date: Fri, 17 Mar 2023 15:50:47 +0100 Subject: [PATCH 2/2] fix: [galaxyCluster index] filter by galaxy should accept UUID too not just ID --- app/Controller/GalaxyClustersController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Controller/GalaxyClustersController.php b/app/Controller/GalaxyClustersController.php index 7246f5174..5eba82a98 100644 --- a/app/Controller/GalaxyClustersController.php +++ b/app/Controller/GalaxyClustersController.php @@ -37,6 +37,7 @@ class GalaxyClustersController extends AppController public function index($galaxyId) { + $galaxyId = $this->Toolbox->findIdByUuid($this->GalaxyCluster->Galaxy, $galaxyId); $filters = $this->IndexFilter->harvestParameters(array('context', 'searchall')); $aclConditions = $this->GalaxyCluster->buildConditions($this->Auth->user()); $contextConditions = array();