From 8fd97bd75d45beb6d6521962ed9a452d97953b5f Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 5 Jul 2010 17:45:44 +0100 Subject: [PATCH] If only calling checkExistingAuth() if the application is horde, it will never be called if a user doesn't access a horde page. --- framework/Core/lib/Horde/Registry.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index d97448428..3f2f07fd7 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -1104,7 +1104,7 @@ class Horde_Registry * - To all authenticated users if no permission is set on $app. * - To anyone who is allowed by an explicit ACL on $app. */ if ($checkPerms) { - if ($this->getAuth() && !$this->checkExistingAuth($app)) { + if ($this->getAuth() && !$this->checkExistingAuth()) { throw new Horde_Exception('User is not authorized', self::AUTH_FAILURE); } @@ -1698,7 +1698,7 @@ class Horde_Registry if ($this->getAuth() && (($app == 'horde') || isset($_SESSION['horde_auth']['app'][$app]))) { - return $this->checkExistingAuth($app); + return $this->checkExistingAuth(); } /* Try transparent authentication. */ @@ -2031,16 +2031,10 @@ class Horde_Registry /** * Check existing auth for triggers that might invalidate it. * - * @param string $app Check authentication for this app. - * * @return boolean Is existing auth valid? */ - public function checkExistingAuth($app) + public function checkExistingAuth() { - if ($app != 'horde') { - return true; - } - $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); if (!empty($GLOBALS['conf']['auth']['checkip']) && -- 2.11.0