summaryrefslogtreecommitdiffstats
path: root/Http
diff options
context:
space:
mode:
authorDanny Berger <dpb587@gmail.com>2011-10-25 14:19:34 -0400
committerDanny Berger <dpb587@gmail.com>2011-10-25 14:19:34 -0400
commit94c93a43d841b5d9dfcdce4f88e7a6bc64f32c68 (patch)
tree22035c651e970fc514c4e7ab9ae07c40c282db5a /Http
parentc4d1bede728216cb5eab1f7aa245b3edd466f4b2 (diff)
downloadsymfony-security-94c93a43d841b5d9dfcdce4f88e7a6bc64f32c68.zip
symfony-security-94c93a43d841b5d9dfcdce4f88e7a6bc64f32c68.tar.gz
symfony-security-94c93a43d841b5d9dfcdce4f88e7a6bc64f32c68.tar.bz2
[Security] Check for request's session before attempting writes.
Diffstat (limited to 'Http')
-rw-r--r--Http/Firewall/ContextListener.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/Http/Firewall/ContextListener.php b/Http/Firewall/ContextListener.php
index 1c9d51b..5f94e43 100644
--- a/Http/Firewall/ContextListener.php
+++ b/Http/Firewall/ContextListener.php
@@ -97,7 +97,9 @@ class ContextListener implements ListenerInterface
$this->logger->debug('Write SecurityContext in the session');
}
- $session = $event->getRequest()->getSession();
+ if (null === $session = $event->getRequest()->getSession()) {
+ return;
+ }
if ((null === $token = $this->context->getToken()) || ($token instanceof AnonymousToken)) {
$session->remove('_security_'.$this->contextKey);