Aliasing the default controller could cause an infinite loop
authorAlexander Ebert <ebert@woltlab.com>
Tue, 7 Jul 2015 09:38:55 +0000 (11:38 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 7 Jul 2015 09:38:55 +0000 (11:38 +0200)
wcfsetup/install/files/lib/system/request/RequestHandler.class.php

index eebd1982f7a9dcaf288812f27976feccbeed7099..ce04280255bd411030f614f8c0383b2d0f1adac8 100644 (file)
@@ -178,7 +178,7 @@ class RequestHandler extends SingletonFactory {
                                }
                                
                                // handle controller aliasing
-                               if (!URL_LEGACY_MODE && isset($routeData['controller'])) {
+                               if (empty($routeData['isImplicitController']) && !URL_LEGACY_MODE && isset($routeData['controller'])) {
                                        $ciController = mb_strtolower($routeData['controller']);
                                        
                                        // aliased controller, redirect to new URL
@@ -289,6 +289,8 @@ class RequestHandler extends SingletonFactory {
                        return;
                }
                
+               if (empty($routeData['controller'])) $routeData['isImplicitController'] = true;
+               
                // resolve implicit application abbreviation for landing page controller
                $landingPageApplication = $landingPage->getApplication();
                $primaryApplication = ApplicationHandler::getInstance()->getPrimaryApplication();