瀏覽代碼

Instead of returning the last token provided return the first.

In case of multiple supporting providers the authentication will be attempted several times.
This happens with the current FacebookBundle for example but could happen with others too. The result was that the first provided token held all appropriate roles while a second one did not.

Christian Schaefer 14 年之前
父節點
當前提交
8460e85840
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.php

+ 1 - 0
src/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.php

@@ -59,6 +59,7 @@ class AuthenticationProviderManager implements AuthenticationManagerInterface
 
             try {
                 $result = $provider->authenticate($token);
+                break;
             } catch (AccountStatusException $e) {
                 $e->setExtraInformation($token);