From: Alexander Ebert Date: Mon, 23 Feb 2015 17:12:51 +0000 (+0100) Subject: Work-around for case-sensitive controller patterns X-Git-Tag: 2.1.0~51 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5d655ff24f888ae3b09bb4be431fbcdd45932534;p=GitHub%2FWoltLab%2FWCF.git Work-around for case-sensitive controller patterns --- diff --git a/wcfsetup/install/files/lib/system/request/Route.class.php b/wcfsetup/install/files/lib/system/request/Route.class.php index ee75593a58..92a3843ae9 100644 --- a/wcfsetup/install/files/lib/system/request/Route.class.php +++ b/wcfsetup/install/files/lib/system/request/Route.class.php @@ -149,6 +149,8 @@ class Route implements IRoute { // validate parameter against a regex pattern if ($this->parameterOptions[$schemaPart]['regexPattern'] !== null) { $pattern = '~^' . $this->parameterOptions[$schemaPart]['regexPattern'] . '$~'; + if (!URL_LEGACY_MODE && $schemaPart == 'controller') $pattern .= 'i'; + if (!preg_match($pattern, $urlParts[$i])) { return false; }