Remove space in user alias to prevent corruption of data files. Thanks to Robert Becskei for the report.

This commit is contained in:
Darold 2012-10-07 23:11:28 +02:00
parent bdf6c8067c
commit e8154b9edb
2 changed files with 3 additions and 1 deletions

View File

@ -2939,6 +2939,7 @@ sub parse_user_aliases
$i++;
next if (!$l || ($l =~ /^[\s\t]*#/));
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]));
} else {

View File

@ -1,7 +1,8 @@
#-------------------------------------------------------------------------------
# Squid Analyzer User Alias configuration file
# 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
#MyOtherNames logon\d+