Преглед изворни кода

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;