From: Michael M Slusarz Date: Sat, 15 Aug 2009 18:31:01 +0000 (-0600) Subject: Fix error on direct access to LogOut action X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ca6f20b6e74bd82bb55ca50e1e72dbea28f206fd;p=horde.git Fix error on direct access to LogOut action --- diff --git a/imp/ajax.php b/imp/ajax.php index d526aa838..a047750b1 100644 --- a/imp/ajax.php +++ b/imp/ajax.php @@ -168,7 +168,8 @@ try { new IMP_Application(array('init' => array('authentication' => 'throw', 'session_control' => $session_control))); } catch (Horde_Exception $e) { /* Handle session timeouts when they come from an AJAX request. */ - if ($e->getCode() == Horde_Registry::AUTH_FAILURE) { + if (($e->getCode() == Horde_Registry::AUTH_FAILURE) && + ($action != 'LogOut')) { $notification = Horde_Notification::singleton(); $imp_notify = $notification->attach('status', array('viewmode' => 'dimp'), 'IMP_Notification_Listener_Status'); $notification->push(str_replace('&', '&', Horde_Auth::getLogoutUrl(array('reason' => Horde_Auth::REASON_SESSION))), 'dimp.timeout', array('content.raw')); @@ -193,10 +194,10 @@ $result = false; switch ($action) { case 'LogOut': - /* Handle logout requests. This needs to be done here because the logout - * tokens might expire otherwise. */ + /* Handle logout requests. This needs to be done here, rather than on the + * browser, because the logout tokens might otherwise expire. */ Horde::redirect(str_replace('&', '&', Horde::getServiceLink('logout', 'imp'))); - break; + exit; case 'CreateFolder': if (empty($mbox)) {