Avoid infinite loops when renaming the default controller
authorAlexander Ebert <ebert@woltlab.com>
Wed, 24 Jan 2018 12:47:08 +0000 (13:47 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 24 Jan 2018 12:47:08 +0000 (13:47 +0100)
wcfsetup/install/files/lib/system/request/route/DynamicRequestRoute.class.php

index 3531f71e68f553044c4f6f3728a8260fd0590fbd..0727caceb423a9936efc43df65cdc7324284a7bb 100644 (file)
@@ -265,6 +265,10 @@ class DynamicRequestRoute implements IRequestRoute {
                        }
                        
                        $this->routeData['isDefaultController'] = (!isset($this->routeData['controller']));
+                       if ($this->routeData['isDefaultController'] && empty($requestURL)) {
+                               // pretend that this controller has been renamed
+                               $this->routeData['isRenamedController'] = true;
+                       }
                        
                        return true;
                }