From 15e38b84a761ee739fac710ddb58ac003125c806 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 14 May 2013 21:27:31 +0200 Subject: [PATCH] RequestHandler now longer mis-redirects if SID is present --- .../install/files/lib/system/request/RequestHandler.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php index 9780c340cf..68a11ceec7 100644 --- a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php @@ -84,7 +84,9 @@ class RequestHandler extends SingletonFactory { if ($landingPage !== null && RouteHandler::getInstance()->isDefaultController()) { // check if redirect URL matches current URL $redirectURL = $landingPage->getLink(); - if (StringUtil::replace(RouteHandler::getHost(), '', $redirectURL) == $_SERVER['REQUEST_URI']) { + $relativeRoute = StringUtil::replace(RouteHandler::getHost(), '', $redirectURL); + + if ($relativeRoute == $_SERVER['REQUEST_URI'] || $relativeRoute == preg_replace('~([?&]s=[a-f0-9]{40})~', '', $_SERVER['REQUEST_URI'])) { $routeData['controller'] = $landingPage->getController(); } else { -- 2.20.1