From: Jason Ish Date: Tue, 8 Apr 2025 22:47:53 +0000 (-0600) Subject: config: handle suricata config with '=' in value X-Git-Tag: 1.3.5~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39b20c37a211f0b94e693595d3312a1be65183a2;p=thirdparty%2Fsuricata-update.git config: handle suricata config with '=' in value 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 --- diff --git a/suricata/update/engine.py b/suricata/update/engine.py index 2714a4d..fbd9bc6 100644 --- a/suricata/update/engine.py +++ b/suricata/update/engine.py @@ -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)