]> git.ipfire.org Git - thirdparty/suricata-update.git/commitdiff
config: handle suricata config with '=' in value 353/head
authorJason Ish <jason.ish@oisf.net>
Tue, 8 Apr 2025 22:47:53 +0000 (16:47 -0600)
committerJason Ish <jason.ish@oisf.net>
Tue, 8 Apr 2025 22:47:53 +0000 (16:47 -0600)
For example, when an '=' appears in the --dump-config output when its
used as part of a bpf-filter.

Ticket: https://redmine.openinfosecfoundation.org/issues/7637

suricata/update/engine.py

index 2714a4d61da7f3a9c4a727027493d17a7c350ce3..fbd9bc60716308917048efbf71157c004ba6d272 100644 (file)
@@ -109,7 +109,7 @@ class Configuration:
         conf = {}
         for line in configuration_dump.splitlines():
             try:
-                key, val = line.decode().split(" = ")
+                key, val = line.decode().split(" = ", maxsplit=1)
                 conf[key] = val
             except:
                 logger.warning("Failed to parse: %s", line)