mirror of
https://github.com/darold/squidanalyzer.git
synced 2025-07-30 01:14:28 +02:00
Fix support to regex with coma in user and network alias file. Regex like "1stFloor 192.168.1.1\d{0,2}" in user-aliases and network-aliases was not permitted. Thanks to Steffen Junick fot the report.
This commit is contained in:
parent
01038d43b5
commit
6d6a1ebea4
@ -2876,7 +2876,7 @@ sub parse_network_aliases
|
||||
$l =~ s/[\s\t]*#.*//;
|
||||
my @data = split(/[\t]+/, $l, 2);
|
||||
if ($#data == 1) {
|
||||
push(@{$alias{$data[0]}}, split(/[\s,;\t]/, $data[1]));
|
||||
push(@{$alias{$data[0]}}, split(/(?<!\{\d)[\s,;\t](?!\d+\})/, $data[1]));
|
||||
} else {
|
||||
die "ERROR: wrong format in network aliases file $file, line $i\n";
|
||||
}
|
||||
@ -2902,7 +2902,7 @@ sub parse_user_aliases
|
||||
my @data = split(/[\t]+/, $l, 2);
|
||||
$data[0] =~ s/\s+/_/g; # Replace space, they are not allowed
|
||||
if ($#data == 1) {
|
||||
push(@{$alias{$data[0]}}, split(/[\s,;\t]/, $data[1]));
|
||||
push(@{$alias{$data[0]}}, split(/(?<!\{\d)[\s,;\t](?!\d+\})/, $data[1]));
|
||||
} else {
|
||||
die "ERROR: wrong format in user aliases file $file, line $i\n";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user