From: Alexander Ebert Date: Thu, 2 Jul 2015 13:48:40 +0000 (+0200) Subject: Work-around for services like GitHub messing up the query string X-Git-Tag: 2.1.6~21 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1cca5cb;p=GitHub%2FWoltLab%2FWCF.git Work-around for services like GitHub messing up the query string --- diff --git a/wcfsetup/install/files/lib/system/request/RouteHandler.class.php b/wcfsetup/install/files/lib/system/request/RouteHandler.class.php index c150e7456f..c6ee9d9c7b 100644 --- a/wcfsetup/install/files/lib/system/request/RouteHandler.class.php +++ b/wcfsetup/install/files/lib/system/request/RouteHandler.class.php @@ -290,6 +290,12 @@ class RouteHandler extends SingletonFactory { $components = explode('&', $_SERVER['QUERY_STRING']); for ($i = 0, $length = count($components); $i < $length; $i++) { $component = $components[$i]; + + $pos = mb_strpos($component, '='); + if ($pos !== false && $pos + 1 === mb_strlen($component)) { + $component = mb_substr($component, 0, -1); + } + if (mb_strpos($component, '=') === false) { self::$pathInfo = urldecode($component); break;