소스 검색

check for session before trying to authentication details

Matt Lehner 14 년 전
부모
커밋
7cfc3923b6
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/Symfony/Component/Security/Http/Firewall/ContextListener.php

+ 4 - 0
src/Symfony/Component/Security/Http/Firewall/ContextListener.php

@@ -91,6 +91,10 @@ class ContextListener implements ListenerInterface
         if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType()) {
             return;
         }
+        
+        if (!$event->getRequest()->hasSession()) {
+            return;
+        }
 
         if (null === $token = $this->context->getToken()) {
             return;