]> git.ipfire.org Git - thirdparty/suricata-update.git/commitdiff
datasets: fix parsing "load" when preceded by a space.
authorJason Ish <jason.ish@oisf.net>
Thu, 15 Feb 2024 16:43:08 +0000 (10:43 -0600)
committerJason Ish <jason.ish@oisf.net>
Fri, 16 Feb 2024 16:50:01 +0000 (10:50 -0600)
Ticket: #6777

CHANGELOG.md
suricata/update/main.py

index a033b026c58fa82f6c54c777408d512a59d553fa..969d7da73f9e394b07539d038caf97894c43d93f 100644 (file)
@@ -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:
index 4a0e7a6dfa2b67e2f81e88bfa74269b7ae61173d..455a3d5ce34cf7dd864fb3026d3c63df39f6ca48 100644 (file)
@@ -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