mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Handle comments using --comment with spaces and - in them
This commit is contained in:
@@ -21,3 +21,4 @@ Added a setup option to configure a firewall for a typical hosting server.
|
||||
Show SNAT and masquerade inputs in custom NAT chains.
|
||||
---- Changes since 1.440 ----
|
||||
DNS queries are now allowed when the firewall is setup for web hosting.
|
||||
Rule coments using --comment containing spaces or - are now properly parsed.
|
||||
|
||||
@@ -86,7 +86,12 @@ while(<FILE>) {
|
||||
# Parse arguments
|
||||
foreach $a (@known_args) {
|
||||
local @vl;
|
||||
while($rule->{'args'} =~ s/\s+(!?)\s*($a)\s+(!?)\s*(([^ \-!]\S*(\s+|$))+)/ / || $rule->{'args'} =~ s/\s+(!?)\s*($a)()(\s+|$)/ /) {
|
||||
while($rule->{'args'} =~
|
||||
s/\s+(!?)\s*($a)\s+(!?)\s*("[^"]*")(\s+|$)/ / ||
|
||||
$rule->{'args'} =~
|
||||
s/\s+(!?)\s*($a)\s+(!?)\s*(([^ \-!]\S*(\s+|$))+)/ / ||
|
||||
$rule->{'args'} =~
|
||||
s/\s+(!?)\s*($a)()(\s+|$)/ /) {
|
||||
push(@vl, [ $1 || $3, &split_quoted_string($4) ]);
|
||||
}
|
||||
local ($aa = $a); $aa =~ s/^-+//;
|
||||
|
||||
Reference in New Issue
Block a user