From: eldy <> Date: Sat, 5 Apr 2003 17:38:12 +0000 (+0000) Subject: Fixed: AllowAccessFromWebToFollowingAuthenticatedUsers did not work for users with... X-Git-Tag: AWSTATS_5_5_BETA~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee796f3599ddc047c529265b4e3c88691616bdcf;p=thirdparty%2FAWStats.git Fixed: AllowAccessFromWebToFollowingAuthenticatedUsers did not work for users with space in name. --- diff --git a/docs/awstats_changelog.txt b/docs/awstats_changelog.txt index 36a36604..496fa906 100644 --- a/docs/awstats_changelog.txt +++ b/docs/awstats_changelog.txt @@ -6,9 +6,11 @@ $Revision$ - $Author$ - $Date$ 5.5 Fixes: -- Summary robots list was limited to MaxNbOfLoginShown instead of - being limited to MaxNbOfRobotShown value. +- Summary robots list was limited to MaxNbOfLoginShown instead of being + limited to MaxNbOfRobotShown value. - Fixed a bug when using HBL codes in ShowRobotsStats parameter. +- AllowAccessFromWebToFollowingAuthenticatedUsers now works for users with + space in name. New features/improvments: - Added a 'Screen Size' report. diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index eb945007..5764204c 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -4781,11 +4781,13 @@ if ($AllowAccessFromWebToAuthenticatedUsersOnly && $ENV{'GATEWAY_INTERFACE'}) { } if (@AllowAccessFromWebToFollowingAuthenticatedUsers) { my $userisinlist=0; + my $currentuser=$ENV{"REMOTE_USER"}; + $currentuser =~ s/\s/%20/g; # Allow authenticated user with space in name to be compared to allowed user list foreach my $key (@AllowAccessFromWebToFollowingAuthenticatedUsers) { - if ($ENV{"REMOTE_USER"} eq $key) { $userisinlist=1; last; } + if ($currentuser eq $key) { $userisinlist=1; last; } } if (! $userisinlist) { - error("User '".$ENV{"REMOTE_USER"}."' is not allowed to access statistics of this domain/config."); + error("User '$currentuser' is not allowed to access statistics of this domain/config."); } } }