From: Jason Ish Date: Thu, 15 Feb 2024 16:43:08 +0000 (-0600) Subject: datasets: fix parsing "load" when preceded by a space. X-Git-Tag: 1.3.1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63040cbc307f00ed8f47c6d77e62e5f3a716c1ec;p=thirdparty%2Fsuricata-update.git datasets: fix parsing "load" when preceded by a space. Ticket: #6777 --- diff --git a/CHANGELOG.md b/CHANGELOG.md index a033b02..969d7da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 1.3.1 - unreleased +- Fix detecting dataset "load" when preceded by a space: + https://redmine.openinfosecfoundation.org/issues/6777 + ## 1.3.0 - 2023-07-07 - Fix loading of configuration files specified in update.yaml: diff --git a/suricata/update/main.py b/suricata/update/main.py index 4a0e7a6..455a3d5 100644 --- a/suricata/update/main.py +++ b/suricata/update/main.py @@ -435,8 +435,7 @@ def manage_classification(suriconf, files): def handle_dataset_files(rule, dep_files): if not rule.enabled: return - - dataset_load = [el.strip() for el in rule.dataset.split(",") if el.startswith("load")] + dataset_load = [el for el in (el.strip() for el in rule.dataset.split(",")) if el.startswith("load")] if not dataset_load: # No dataset load found. return