From 8747058aeaa16ece0107b756645abcb8f8a32b5b Mon Sep 17 00:00:00 2001 From: pdontthink Date: Sat, 25 Sep 2010 04:08:03 +0000 Subject: [PATCH] Fix sqauth_read_password() for plugins running on the login_verified hook when the 'key' cookie isn't yet set git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14067 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- doc/ChangeLog | 1 + functions/auth.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index ca051306..42c638df 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -352,6 +352,7 @@ Version 1.5.2 - SVN - Fixed attachment filename decoding problems (#2994865). - Now allow multiple plugins to handle (add links for) a single attachment MIME type. + - Fixed sqauth_read_password() for plugins on the login_verified hook. Version 1.5.1 (branched on 2006-02-12) -------------------------------------- diff --git a/functions/auth.php b/functions/auth.php index 5304458e..fbc28e06 100644 --- a/functions/auth.php +++ b/functions/auth.php @@ -93,6 +93,9 @@ function sqauth_is_logged_in() { * @since 1.5.1 */ function sqauth_read_password() { + global $currentHookName; + if ($currentHookName == 'login_verified') global $key; + sqgetGlobalVar('key', $key, SQ_COOKIE); sqgetGlobalVar('onetimepad', $onetimepad,SQ_SESSION); -- 2.25.1