From dfbf446092e4bbaca28e61ce944bbccd72f1acdc Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 9 Oct 2025 14:55:26 -0700 Subject: [PATCH] Add quotes around params where needed https://github.com/webmin/webmin/issues/2572 --- fail2ban/save_jail.cgi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fail2ban/save_jail.cgi b/fail2ban/save_jail.cgi index 2decf1ac1..406b506dd 100755 --- a/fail2ban/save_jail.cgi +++ b/fail2ban/save_jail.cgi @@ -85,7 +85,11 @@ else { if ($in{"protocol_$i"}) { push(@opts, "protocol=".$in{"protocol_$i"}); } - push(@opts, split(/\s+/, $in{"others_$i"})); + foreach my $oo (split(/\s+/, $in{"others_$i"})) { + my ($n, $v) = split(/=/, $oo, 2); + $v = "\"$v\"" if ($v =~ /\s|,|=/); + push(@opts, "$n=$v"); + } push(@actions, $in{"action_$i"}."[".join(", ", @opts)."]"); }