diff options
author | Cyril Quintin <cyril.quintin@gmail.com> | 2011-03-05 13:33:56 +0100 |
---|---|---|
committer | Cyril Quintin <cyril.quintin@gmail.com> | 2011-03-05 13:33:56 +0100 |
commit | 98d41dae3cee9dbcbed272a763dc71e1a1309ccd (patch) | |
tree | 595e115089d5f8de6bdf913f913c2d8057bd48db | |
parent | a45d4a21c023980a2d652234d7068a477a20f6e8 (diff) | |
download | symfony-security-98d41dae3cee9dbcbed272a763dc71e1a1309ccd.zip symfony-security-98d41dae3cee9dbcbed272a763dc71e1a1309ccd.tar.gz symfony-security-98d41dae3cee9dbcbed272a763dc71e1a1309ccd.tar.bz2 |
TICKET #9557: session isn't required when using http basic authentification mecanism for example
-rw-r--r-- | Http/Firewall/ExceptionListener.php | 5 |
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); } |