Ver Fonte

Fix sqauth_read_password() for plugins running on the login_verified hook when the 'key' cookie isn't yet set

pdontthink há 15 anos atrás
pai
commit
d31ba01582
2 ficheiros alterados com 4 adições e 0 exclusões
  1. 1 0
      doc/ChangeLog
  2. 3 0
      functions/auth.php

+ 1 - 0
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)
 --------------------------------------

+ 3 - 0
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);