RequestHandler now longer mis-redirects if SID is present
authorAlexander Ebert <ebert@woltlab.com>
Tue, 14 May 2013 19:27:31 +0000 (21:27 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 14 May 2013 19:27:31 +0000 (21:27 +0200)
wcfsetup/install/files/lib/system/request/RequestHandler.class.php

index 9780c340cf9baa768e8e54a5bed7692fda2f0c0d..68a11ceec72e3a30f559ef606b6efcb3b09dae7a 100644 (file)
@@ -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 {