]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Fixed: AllowAccessFromWebToFollowingAuthenticatedUsers did not work for users with...
authoreldy <>
Sat, 5 Apr 2003 17:38:12 +0000 (17:38 +0000)
committereldy <>
Sat, 5 Apr 2003 17:38:12 +0000 (17:38 +0000)
docs/awstats_changelog.txt
wwwroot/cgi-bin/awstats.pl

index 36a36604338da6e0a118aa0b5a9041870784e510..496fa9063f9e1658a4485d26bbd84ac0e9da835d 100644 (file)
@@ -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.
index eb9450074f29c2c0e1b481a5fbef79fc25ff00a7..5764204ccc6d517ca7f070bcd9f99a498da1eefc 100644 (file)
@@ -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\r
                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.");
                }
        }
 }