From a000a582fca7d8b41b8d82d8fe62ac7020ca45a4 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 3 Mar 2015 16:10:32 +0100 Subject: [PATCH] Applying controller case-sensitive check for aliased controllers --- .../lib/system/request/RequestHandler.class.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php index 9129c7c69f..735f5712e5 100644 --- a/wcfsetup/install/files/lib/system/request/RequestHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RequestHandler.class.php @@ -179,14 +179,23 @@ class RequestHandler extends SingletonFactory { // handle controller aliasing if (!URL_LEGACY_MODE && isset($routeData['controller'])) { + $ciController = mb_strtolower($routeData['controller']); + // aliased controller, redirect to new URL - $alias = $this->getAliasByController($routeData['controller']); + $alias = $this->getAliasByController($ciController); if ($alias !== null) { $this->redirect($routeData, $application); } - $controller = $this->getControllerByAlias($routeData['controller']); + $controller = $this->getControllerByAlias($ciController); if ($controller !== null) { + // check if controller was provided explicitly as it should + $alias = $this->getAliasByController($controller); + if ($alias != $routeData['controller']) { + $routeData['controller'] = $controller; + $this->redirect($routeData, $application); + } + $routeData['controller'] = $controller; } } -- 2.20.1