aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/auth/auth_apache.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-03-02 01:05:39 +0100
committerNils Adermann <naderman@naderman.de>2010-03-02 01:05:39 +0100
commita45bca7c49623341ae971d4e1014ba9de38de982 (patch)
treea1f033124b14c020e850525a6ea745cb7cb3dbab /phpBB/includes/auth/auth_apache.php
parent1f3498c0d6a20a08fe17948b32fc435f85a6eff8 (diff)
parent6485d66743d55aeba95aed86fcde4a0e555e3104 (diff)
downloadforums-a45bca7c49623341ae971d4e1014ba9de38de982.tar
forums-a45bca7c49623341ae971d4e1014ba9de38de982.tar.gz
forums-a45bca7c49623341ae971d4e1014ba9de38de982.tar.bz2
forums-a45bca7c49623341ae971d4e1014ba9de38de982.tar.xz
forums-a45bca7c49623341ae971d4e1014ba9de38de982.zip
Merge commit 'release-3.0.5-RC1'
Diffstat (limited to 'phpBB/includes/auth/auth_apache.php')
-rw-r--r--phpBB/includes/auth/auth_apache.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/phpBB/includes/auth/auth_apache.php b/phpBB/includes/auth/auth_apache.php
index 80ac81ed46..930f5a0632 100644
--- a/phpBB/includes/auth/auth_apache.php
+++ b/phpBB/includes/auth/auth_apache.php
@@ -104,7 +104,7 @@ function login_apache(&$username, &$password)
'user_row' => $row,
);
}
-
+
// Successful login...
return array(
'status' => LOGIN_SUCCESS,
@@ -227,15 +227,22 @@ function user_row_apache($username, $password)
*/
function validate_session_apache(&$user)
{
- if (!isset($_SERVER['PHP_AUTH_USER']))
+ // Check if PHP_AUTH_USER is set and handle this case
+ if (isset($_SERVER['PHP_AUTH_USER']))
{
- return false;
+ $php_auth_user = '';
+ set_var($php_auth_user, $_SERVER['PHP_AUTH_USER'], 'string', true);
+
+ return ($php_auth_user === $user['username']) ? true : false;
}
- $php_auth_user = '';
- set_var($php_auth_user, $_SERVER['PHP_AUTH_USER'], 'string', true);
+ // PHP_AUTH_USER is not set. A valid session is now determined by the user type (anonymous/bot or not)
+ if ($user['user_type'] == USER_IGNORE)
+ {
+ return true;
+ }
- return ($php_auth_user === $user['username']) ? true : false;
+ return false;
}
?> \ No newline at end of file