Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chg: [test] Check attribute search #9642

Merged
merged 2 commits into from Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Controller/AttributesController.php
Expand Up @@ -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'];
Expand Down
3 changes: 3 additions & 0 deletions tests/testlive_comprehensive_local.py
Expand Up @@ -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)
Expand Down