Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 899f176

Browse files
committed
[Security] fixed a leak in ExceptionListener
1 parent 2fd8a7a commit 899f176

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ public function register(EventDispatcherInterface $dispatcher)
7676
*/
7777
public function onKernelException(GetResponseForExceptionEvent $event)
7878
{
79+
// we need to remove ourselves as the exception listener can be
80+
// different depending on the Request
81+
$event->getDispatcher()->removeListener(KernelEvents::EXCEPTION, array($this, 'onKernelException'));
82+
7983
$exception = $event->getException();
8084
$request = $event->getRequest();
8185

0 commit comments

Comments
 (0)