summaryrefslogtreecommitdiffstats
path: root/Http
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2013-02-07 12:58:45 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2013-02-07 12:58:45 +0100
commitb570b85dcdea40e070678c08af85d94083111fd4 (patch)
treea09dcdb7a080ca2489011775bff21e18755ce150 /Http
parentf02a0c86b6264fc461fc86d39704579439445d3e (diff)
parent1c556ad72cfb835726456d1ef63664a105b9ddf2 (diff)
downloadsymfony-security-b570b85dcdea40e070678c08af85d94083111fd4.zip
symfony-security-b570b85dcdea40e070678c08af85d94083111fd4.tar.gz
symfony-security-b570b85dcdea40e070678c08af85d94083111fd4.tar.bz2
Merge branch '2.1' into 2.2
* 2.1: [HttpKernel] fixed the creation of the Profiler directory [Security] fixed session creation when none is needed (closes #6917) [FrameworkBundle] removed obsolete comment (see 2e356c1)
Diffstat (limited to 'Http')
-rw-r--r--Http/Firewall/ContextListener.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/Http/Firewall/ContextListener.php b/Http/Firewall/ContextListener.php
index bfbf0ee..6c06ca8 100644
--- a/Http/Firewall/ContextListener.php
+++ b/Http/Firewall/ContextListener.php
@@ -70,7 +70,6 @@ class ContextListener implements ListenerInterface
}
$request = $event->getRequest();
-
$session = $request->hasPreviousSession() ? $request->getSession() : null;
if (null === $session || null === $token = $session->get('_security_'.$this->contextKey)) {
@@ -117,7 +116,10 @@ class ContextListener implements ListenerInterface
$this->logger->debug('Write SecurityContext in the session');
}
- if (null === $session = $event->getRequest()->getSession()) {
+ $request = $event->getRequest();
+ $session = $request->hasPreviousSession() ? $request->getSession() : null;
+
+ if (null === $session) {
return;
}