mirror of
https://github.com/darold/squidanalyzer.git
synced 2025-07-31 01:44:29 +02:00
Remove space in user alias to prevent corruption of data files. Thanks to Robert Becskei for the report.
This commit is contained in:
parent
bdf6c8067c
commit
e8154b9edb
@ -2939,6 +2939,7 @@ sub parse_user_aliases
|
|||||||
$i++;
|
$i++;
|
||||||
next if (!$l || ($l =~ /^[\s\t]*#/));
|
next if (!$l || ($l =~ /^[\s\t]*#/));
|
||||||
my @data = split(/[\t]+/, $l, 2);
|
my @data = split(/[\t]+/, $l, 2);
|
||||||
|
$data[0] =~ s/\s+/_/g; # Replace space, they are not allowed
|
||||||
if ($#data == 1) {
|
if ($#data == 1) {
|
||||||
push(@{$alias{$data[0]}}, split(/[\s,;\t]/, $data[1]));
|
push(@{$alias{$data[0]}}, split(/[\s,;\t]/, $data[1]));
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Squid Analyzer User Alias configuration file
|
# Squid Analyzer User Alias configuration file
|
||||||
# FORMAT : FULL_USER_NAME IP_ADDRESS|LOGIN_NAME,LOGIN_REGEX
|
# FORMAT : FULL_USER_NAME IP_ADDRESS|LOGIN_NAME,LOGIN_REGEX
|
||||||
# Field separator must be one or more tabulation. See example bellow
|
# Field separator must be one or more tabulation. Space in user name are not
|
||||||
|
# allowed. See example bellow
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#MyFirstName mylogin,192.168.1.12
|
#MyFirstName mylogin,192.168.1.12
|
||||||
#MyOtherNames logon\d+
|
#MyOtherNames logon\d+
|
||||||
|
Loading…
x
Reference in New Issue
Block a user