From 1a2567e19ee71ea23073a91de721d747fc6d2506 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Thu, 17 Dec 2015 13:54:40 +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. --- .../Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php b/src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php index 9514ebf616fc..248984ec54bc 100644 --- a/src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php +++ b/src/Symfony/Bundle/SecurityBundle/Templating/Helper/LogoutUrlHelper.php @@ -101,7 +101,7 @@ private function generateLogoutUrl($key, $referenceType) if ('/' === $logoutPath[0]) { $request = $this->container->get('request'); - $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);