Selaa lähdekoodia

check for session before trying to authentication details

Matt Lehner 13 vuotta sitten
vanhempi
commit
7cfc3923b6

+ 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;