From 542b877424966e88f563b60b1a541bdf282fae3e Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Thu, 17 Dec 2015 14:04:43 +0100 Subject: [PATCH] Fix the logout path when not using the router This needs to use the base url, not the base path, so that it goes through the front controller when not using url rewriting. --- .../Component/Security/Http/Logout/LogoutUrlGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php b/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php index 298c22445c..4ad63cc3b1 100644 --- a/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php +++ b/src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php @@ -121,7 +121,7 @@ class LogoutUrlGenerator $request = $this->requestStack->getCurrentRequest(); - $url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBasePath().$logoutPath; + $url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBaseUrl().$logoutPath; if (!empty($parameters)) { $url .= '?'.http_build_query($parameters);