diff --git a/app/Controller/AttributesController.php b/app/Controller/AttributesController.php index 2d6f13691f8..9694cfac8b8 100644 --- a/app/Controller/AttributesController.php +++ b/app/Controller/AttributesController.php @@ -1576,7 +1576,7 @@ public function search($continue = false) // Force index for performance reasons see #3321 if (isset($filters['value'])) { - $this->paginate['forceIndexHint'] = '(value1, value2)'; + $this->paginate['forceIndexHint'] = 'value1, value2'; } $this->paginate['conditions'] = $params['conditions']; diff --git a/tests/testlive_comprehensive_local.py b/tests/testlive_comprehensive_local.py index 52de96262bd..a7926df6fca 100644 --- a/tests/testlive_comprehensive_local.py +++ b/tests/testlive_comprehensive_local.py @@ -923,6 +923,9 @@ def test_event_alert_default_enabled(self): self.assertTrue(created_user.autoalert, created_user) self.admin_misp_connector.delete_user(created_user) + def test_attribute_search(self): + request(self.admin_misp_connector, "GET", "/attributes/search/value:8.8.8.8.json") + def test_search_snort_suricata(self): event = create_simple_event() event.add_attribute('ip-src', '8.8.8.8', to_ids=True)