Add quotes around params where needed

https://github.com/webmin/webmin/issues/2572
This commit is contained in:
Jamie Cameron
2025-10-09 14:55:26 -07:00
parent 8957333dca
commit dfbf446092

View File

@@ -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)."]");
}