From: Michael M Slusarz Date: Tue, 9 Mar 2010 04:11:00 +0000 (-0700) Subject: Bug #8842: Don't throw exception for a transparent() authentication failure X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9d4149dddf111e8e0be758fef2f48f3676d765c7;p=horde.git Bug #8842: Don't throw exception for a transparent() authentication failure --- diff --git a/framework/Auth/lib/Horde/Auth/Application.php b/framework/Auth/lib/Horde/Auth/Application.php index 7a2384249..ea8268e89 100644 --- a/framework/Auth/lib/Horde/Auth/Application.php +++ b/framework/Auth/lib/Horde/Auth/Application.php @@ -249,7 +249,6 @@ class Horde_Auth_Application extends Horde_Auth_Base * single parameter: the current class instance. * * @return boolean Whether transparent login is supported. - * @throws Horde_Auth_Exception */ protected function _transparent() { diff --git a/imp/lib/Auth.php b/imp/lib/Auth.php index fdc4e87c8..166d9ebaa 100644 --- a/imp/lib/Auth.php +++ b/imp/lib/Auth.php @@ -85,7 +85,6 @@ class IMP_Auth * @param Horde_Auth_Application $auth_ob The authentication object. * * @return boolean Whether transparent login is supported. - * @throws Horde_Auth_Exception */ static public function transparent($auth_ob) { @@ -96,8 +95,12 @@ class IMP_Auth if (!isset($credentials['server'])) { $credentials['server'] = self::getAutoLoginServer(); } - self::_createSession($auth_ob->getCredential()); - return true; + try { + self::_createSession($auth_ob->getCredential()); + return true; + } catch (Horde_Auth_Exception $e) { + return false; + } } /* Attempt hordeauth authentication. */ @@ -106,8 +109,12 @@ class IMP_Auth return false; } - self::_createSession($credentials); - return true; + try { + self::_createSession($credentials); + return true; + } catch (Horde_Auth_Exception $e) { + return false; + } } /**