Sfoglia il codice sorgente

ZF-7546
- Fix for Zend_Auth::authenticate() successive call / clean state issue

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@18038 44c647ce-9c0f-0410-b52a-842ac1e357ba

ralph 16 anni fa
parent
commit
f783d16f6d
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8 0
      library/Zend/Auth.php

+ 8 - 0
library/Zend/Auth.php

@@ -116,6 +116,14 @@ class Zend_Auth
     {
         $result = $adapter->authenticate();
 
+        /**
+         * ZF-7546 - prevent multiple succesive calls from storing inconsistent results
+         * Ensure storage has clean state
+         */ 
+        if ($this->hasIdentity()) {
+            $this->clearIdentity();
+        }
+        
         if ($result->isValid()) {
             $this->getStorage()->write($result->getIdentity());
         }