From 1cca5cbbb916ecb645566beb6de7482f8e5bd353 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 2 Jul 2015 15:48:40 +0200 Subject: [PATCH] Work-around for services like GitHub messing up the query string --- .../install/files/lib/system/request/RouteHandler.class.php | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 2.20.1