diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2013-09-06 20:21:06 +0200 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2013-09-06 20:21:06 +0200 |
commit | e3b1e223c042122945644e34fdae102e843d50dd (patch) | |
tree | a33012a908f4608e1a79894e8474dbba94e4a199 | |
parent | 56a4c02cc1bcb11191576e1e2167169f1bd16fad (diff) | |
parent | 73e267b8033bc9da70dc4cd0e51f9e77278aecff (diff) | |
download | symfony-security-e3b1e223c042122945644e34fdae102e843d50dd.zip symfony-security-e3b1e223c042122945644e34fdae102e843d50dd.tar.gz symfony-security-e3b1e223c042122945644e34fdae102e843d50dd.tar.bz2 |
Merge branch '2.3'
* 2.3:
Fixing singular form for kisses, accesses and addresses.
fixed some circular references
[Security] fixed a leak in ExceptionListener
[Security] fixed a leak in the ContextListener
Ignore posix_istatty warnings
removed unused variable
[Form] fix iterator typehint
typos
Button missing getErrorsAsString() fixes #8084 Debug: Not calling undefined method anymore. If the form contained a submit button the call would fail and the debug of the form wasn't possible. Now it will work in all cases. This fixes #8084
Use isset() instead of array_key_exists() in DIC
Fixed annotation
[BrowserKit] fixed method/files/content when redirecting a request
[BrowserKit] removed some headers when redirecting a request
[BrowserKit] fixed headers when redirecting if history is set to false (refs #8697)
[HttpKernel] fixed route parameters storage in the Request data collector (closes #8867)
[BrowserKit] Pass headers when `followRedirect()` is called
Return BC compatibility for `@Route` parameters and default values
Conflicts:
src/Symfony/Component/Security/Http/Firewall/ContextListener.php
-rw-r--r-- | Http/Firewall/ContextListener.php | 4 | ||||
-rw-r--r-- | Http/Firewall/ExceptionListener.php | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Http/Firewall/ContextListener.php b/Http/Firewall/ContextListener.php index 2bb8065..2db79f3 100644 --- a/Http/Firewall/ContextListener.php +++ b/Http/Firewall/ContextListener.php @@ -37,6 +37,7 @@ class ContextListener implements ListenerInterface private $logger; private $userProviders; private $dispatcher; + private $registered; public function __construct(SecurityContextInterface $context, array $userProviders, $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null) { @@ -64,8 +65,9 @@ class ContextListener implements ListenerInterface */ public function handle(GetResponseEvent $event) { - if (null !== $this->dispatcher && $event->isMasterRequest()) { + if (!$this->registered && null !== $this->dispatcher && $event->isMasterRequest()) { $this->dispatcher->addListener(KernelEvents::RESPONSE, array($this, 'onKernelResponse')); + $this->registered = true; } $request = $event->getRequest(); diff --git a/Http/Firewall/ExceptionListener.php b/Http/Firewall/ExceptionListener.php index 6554595..abbb460 100644 --- a/Http/Firewall/ExceptionListener.php +++ b/Http/Firewall/ExceptionListener.php @@ -76,6 +76,10 @@ class ExceptionListener */ public function onKernelException(GetResponseForExceptionEvent $event) { + // we need to remove ourselves as the exception listener can be + // different depending on the Request + $event->getDispatcher()->removeListener(KernelEvents::EXCEPTION, array($this, 'onKernelException')); + $exception = $event->getException(); $request = $event->getRequest(); |