diff options
author | Nicolas Grekas <nicolas.grekas@gmail.com> | 2015-07-29 09:12:56 +0200 |
---|---|---|
committer | Nicolas Grekas <nicolas.grekas@gmail.com> | 2015-07-29 09:12:56 +0200 |
commit | 64e5aa5963622bfcf7d036e2aabfd8b99e8bba4e (patch) | |
tree | 62af9a75d852831f8e3f03f5dba1ca52bb8f2efa | |
parent | bde98dcf4a0448cb8a5bd1199ecf71a90ee9307d (diff) | |
parent | 3d137c73cd8c6cb584e3f478b52de00e751d2289 (diff) | |
download | symfony-security-64e5aa5963622bfcf7d036e2aabfd8b99e8bba4e.zip symfony-security-64e5aa5963622bfcf7d036e2aabfd8b99e8bba4e.tar.gz symfony-security-64e5aa5963622bfcf7d036e2aabfd8b99e8bba4e.tar.bz2 |
Merge branch '2.7' into 2.8
* 2.7:
[php7] Fix for substr() always returning a string
[Security] Do not save the target path in the session for a stateless firewall
Fix calls to HttpCache#getSurrogate triggering E_USER_DEPRECATED errors.
[DependencyInjection] fixed FrozenParameterBag and improved Parameter…
-rw-r--r-- | Http/Firewall/ExceptionListener.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Http/Firewall/ExceptionListener.php b/Http/Firewall/ExceptionListener.php index 6d1f27d..a1cae2a 100644 --- a/Http/Firewall/ExceptionListener.php +++ b/Http/Firewall/ExceptionListener.php @@ -47,8 +47,9 @@ class ExceptionListener private $errorPage; private $logger; private $httpUtils; + private $stateless; - public function __construct(TokenStorageInterface $tokenStorage, AuthenticationTrustResolverInterface $trustResolver, HttpUtils $httpUtils, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint = null, $errorPage = null, AccessDeniedHandlerInterface $accessDeniedHandler = null, LoggerInterface $logger = null) + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationTrustResolverInterface $trustResolver, HttpUtils $httpUtils, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint = null, $errorPage = null, AccessDeniedHandlerInterface $accessDeniedHandler = null, LoggerInterface $logger = null, $stateless = false) { $this->tokenStorage = $tokenStorage; $this->accessDeniedHandler = $accessDeniedHandler; @@ -58,6 +59,7 @@ class ExceptionListener $this->authenticationTrustResolver = $trustResolver; $this->errorPage = $errorPage; $this->logger = $logger; + $this->stateless = $stateless; } /** @@ -185,7 +187,9 @@ class ExceptionListener $this->logger->debug('Calling Authentication entry point.'); } - $this->setTargetPath($request); + if (!$this->stateless) { + $this->setTargetPath($request); + } if ($authException instanceof AccountStatusException) { // remove the security token to prevent infinite redirect loops |