From fbc21fedf7ff34b8281980edeef3963ec9420160 Mon Sep 17 00:00:00 2001 From: "Johannes M. Schmitt" Date: Tue, 1 Feb 2011 17:27:12 +0100 Subject: [PATCH] [Security] some bug fixes --- .../Security/Factory/RememberMeFactory.php | 4 ++-- .../Http/Firewall/AbstractPreAuthenticatedListener.php | 1 + .../Component/Security/Http/Firewall/RememberMeListener.php | 3 ++- .../Component/Security/Http/Firewall/SwitchUserListener.php | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php index 2ea4e6962a..e8646e90d0 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php @@ -24,8 +24,8 @@ class RememberMeFactory implements SecurityFactoryInterface $authProviderId = 'security.authentication.provider.rememberme.'.$id; $container ->setDefinition($authProviderId, new DefinitionDecorator('security.authentication.provider.rememberme')) - ->addArgument(1, $config['key']) - ->addArgument(2, $id) + ->addArgument($config['key']) + ->addArgument($id) ->addTag('security.authentication_provider') ; diff --git a/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php b/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php index 205a13f305..9555bfe7db 100644 --- a/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Security\Http\Firewall; +use Symfony\Component\EventDispatcher\Event; use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; use Symfony\Component\HttpKernel\Log\LoggerInterface; diff --git a/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php b/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php index bc741523f5..db9b6232c3 100644 --- a/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/RememberMeListener.php @@ -2,6 +2,7 @@ namespace Symfony\Component\Security\Http\Firewall; +use Symfony\Component\EventDispatcher\Event; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Core\Exception\CookieTheftException; @@ -101,7 +102,7 @@ class RememberMeListener implements ListenerInterface $this->securityContext->setToken($token); if (null !== $this->eventDispatcher) { - $this->eventDispatcher->notify(new Event($this, 'security.interactive_login', array('request' => $request, 'token' => $token))); + $this->eventDispatcher->notify(new Event($this, 'security.interactive_login', array('request' => $event->get('request'), 'token' => $token))); } if (null !== $this->logger) { diff --git a/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php b/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php index e2efb2798e..d8ae42d2ea 100644 --- a/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/SwitchUserListener.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Security\Http\Firewall; +use Symfony\Component\EventDispatcher\Event; use Symfony\Component\Security\Core\SecurityContext; use Symfony\Component\Security\Core\User\UserProviderInterface; use Symfony\Component\Security\Core\User\AccountCheckerInterface;