summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Schmitt <schmittjoh@gmail.com>2011-03-05 13:50:14 +0100
committerJohannes Schmitt <schmittjoh@gmail.com>2011-03-05 13:50:14 +0100
commitea5659f0c5243bacf199ee40758928e9e92db031 (patch)
tree0be766b472723f9d05365eb74e33a8b759b134a0
parentfa8db02dbc8bbf8b0c2f2a35e217cd9abdfd28e3 (diff)
parent98d41dae3cee9dbcbed272a763dc71e1a1309ccd (diff)
downloadsymfony-security-ea5659f0c5243bacf199ee40758928e9e92db031.zip
symfony-security-ea5659f0c5243bacf199ee40758928e9e92db031.tar.gz
symfony-security-ea5659f0c5243bacf199ee40758928e9e92db031.tar.bz2
Merge branch 'cyqui-TICKET_9557' into security
-rw-r--r--Http/Firewall/ExceptionListener.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/Http/Firewall/ExceptionListener.php b/Http/Firewall/ExceptionListener.php
index 350b029..d8f016e 100644
--- a/Http/Firewall/ExceptionListener.php
+++ b/Http/Firewall/ExceptionListener.php
@@ -160,7 +160,10 @@ class ExceptionListener implements ListenerInterface
$this->logger->debug('Calling Authentication entry point');
}
- $request->getSession()->set('_security.target_path', $request->getUri());
+ // session isn't required when using http basic authentification mecanism for example
+ if ($request->hasSession()) {
+ $request->getSession()->set('_security.target_path', $request->getUri());
+ }
return $this->authenticationEntryPoint->start($event, $request, $authException);
}