summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--feed.php2
-rw-r--r--inc/auth.php9
2 files changed, 5 insertions, 6 deletions
diff --git a/feed.php b/feed.php
index 298c20a65..f63d7c498 100644
--- a/feed.php
+++ b/feed.php
@@ -161,7 +161,7 @@ function rssRecentChanges(&$rss,$num,$ltype,$ns,$minor){
$user = @$recent['user']; // the @ spares time repeating lookup
$item->author = '';
- if($user && $conf['useacl']){
+ if($user && $conf['useacl'] && $auth){
$userInfo = $auth->getUserData($user);
$item->author = $userInfo['name'];
if($guardmail) {
diff --git a/inc/auth.php b/inc/auth.php
index 2511516c2..c30aabe82 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -39,11 +39,10 @@
if (class_exists($auth_class)) {
$auth = new $auth_class();
if ($auth->success == false) {
+ // degrade to unauthenticated user
unset($auth);
+ auth_logoff();
msg($lang['authtempfail'], -1);
-
- // turn acl config setting off for the rest of this page
- $conf['useacl'] = 0;
}
} else {
nice_die($lang['authmodfailed']);
@@ -54,7 +53,7 @@
}
// do the login either by cookie or provided credentials
- if($conf['useacl']){
+ if($conf['useacl'] && $auth){
if (!isset($_REQUEST['u'])) $_REQUEST['u'] = '';
if (!isset($_REQUEST['p'])) $_REQUEST['p'] = '';
if (!isset($_REQUEST['r'])) $_REQUEST['r'] = '';
@@ -125,7 +124,7 @@ function auth_login($user,$pass,$sticky=false,$silent=false){
if ($auth->checkPass($user,$pass)){
// make logininfo globally available
$_SERVER['REMOTE_USER'] = $user;
- $USERINFO = $auth->getUserData($user); //FIXME move all references to session
+ $USERINFO = $auth->getUserData($user);
// set cookie
$pass = PMA_blowfish_encrypt($pass,auth_cookiesalt());