From 1f646e86a8e3f4667906510041d5426931f75a6f Mon Sep 17 00:00:00 2001 From: Johannes Schmitt Date: Sat, 14 May 2011 16:20:05 +0200 Subject: [Security/Http] {_locale} can be used as placeholder in target path generation fixes #861 --- Http/Firewall/AbstractAuthenticationListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Http/Firewall/AbstractAuthenticationListener.php b/Http/Firewall/AbstractAuthenticationListener.php index 2b2db40..3d438bd 100644 --- a/Http/Firewall/AbstractAuthenticationListener.php +++ b/Http/Firewall/AbstractAuthenticationListener.php @@ -222,7 +222,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface if (null !== $this->successHandler) { $response = $this->successHandler->onAuthenticationSuccess($request, $token); } else { - $path = $this->determineTargetUrl($request); + $path = strtr($this->determineTargetUrl($request), '{_locale}', $session->getLocale()); $response = new RedirectResponse(0 !== strpos($path, 'http') ? $request->getUriForPath($path) : $path, 302); } -- cgit v1.1