From 82b4d442c72f5c37051ad33f4c3afa0a07365e81 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 17 Mar 2009 13:18:23 -0600 Subject: [PATCH] Fix password/username retrieval from session data --- imp/lib/Compose.php | 4 ++-- imp/redirect.php | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/imp/lib/Compose.php b/imp/lib/Compose.php index cf18add65..d84442f7d 100644 --- a/imp/lib/Compose.php +++ b/imp/lib/Compose.php @@ -691,8 +691,8 @@ class IMP_Compose * current IMAP / POP3 connection are valid for SMTP authentication as * well. */ if (!empty($params['auth']) && empty($params['username'])) { - $params['username'] = $_SESSION['imp']['user']; - $params['password'] = Horde_Secret::read(IMP::getAuthKey(), $_SESSION['imp']['pass']); + $params['username'] = $GLOBALS['imp_imap']->ob->getParam('username'); + $params['password'] = $GLOBALS['imp_imap']->ob->getParam('password'); } return array('driver' => $GLOBALS['conf']['mailer']['type'], 'params' => $params); diff --git a/imp/redirect.php b/imp/redirect.php index cbeba13f7..5daf5e7d1 100644 --- a/imp/redirect.php +++ b/imp/redirect.php @@ -114,8 +114,7 @@ if (isset($_SESSION['imp']) && is_array($_SESSION['imp'])) { /* Make sure that if a username was specified, it is the current * username. */ if ((!is_null($imapuser) && ($imapuser != $_SESSION['imp']['user'])) || - (!is_null($pass) && ($pass != Horde_Secret::read(IMP::getAuthKey(), $_SESSION['imp']['pass'])))) { - + (!is_null($pass) && ($pass != $GLOBALS['imp_imap']->ob->getParam('password')))) { /* Disable the old session. */ unset($_SESSION['imp']); _redirect(Auth::addLogoutParameters(IMP::logoutUrl(), AUTH_REASON_FAILED)); -- 2.11.0