From: Alexander Ebert Date: Tue, 10 Sep 2013 18:57:24 +0000 (+0200) Subject: Fixed handling of parameters for landing page X-Git-Tag: 2.0.0_Beta_9~50^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2728901ea1c42f925d65872db6047bd18b28822d;p=GitHub%2FWoltLab%2FWCF.git Fixed handling of parameters for landing page --- diff --git a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php index 8b02c99c73..e16a5a20fc 100644 --- a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php @@ -111,7 +111,14 @@ class RequestHandler extends SingletonFactory { $redirectURL = $landingPage->getLink(); $relativeRoute = str_replace(RouteHandler::getHost(), '', $redirectURL); - if ($relativeRoute == preg_replace('~index.php$~i', '', $_SERVER['REQUEST_URI']) || $relativeRoute == preg_replace('~([?&]s=[a-f0-9]{40})~', '', $_SERVER['REQUEST_URI'])) { + // strip query string for comparison + $pos = mb_strpos($relativeRoute, '?'); + if ($pos !== false) $relativeRoute = mb_substr($relativeRoute, 0, $pos); + $requestUri = $_SERVER['REQUEST_URI']; + $pos = mb_strpos($requestUri, '?'); + if ($pos !== false) $requestUri = mb_substr($requestUri, 0, $pos); + + if ($relativeRoute == $requestUri) { $routeData['controller'] = $landingPage->getController(); } else {