From a68fb810056b901d3ad764bb132702569b6500c1 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 30 Mar 2015 15:55:04 +0200 Subject: [PATCH] Fixed erroneous redirect on weird webservers --- wcfsetup/install/files/lib/page/AbstractPage.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wcfsetup/install/files/lib/page/AbstractPage.class.php b/wcfsetup/install/files/lib/page/AbstractPage.class.php index 2e66ce275f..ff22acb50c 100644 --- a/wcfsetup/install/files/lib/page/AbstractPage.class.php +++ b/wcfsetup/install/files/lib/page/AbstractPage.class.php @@ -193,6 +193,11 @@ abstract class AbstractPage implements IPage, ITrackablePage { $requestURI = StringUtil::convertEncoding('ISO-8859-1', 'UTF-8', $requestURI); } + // some webservers output lower-case encoding (e.g. %c3 instead of %C3) + $requestURI = preg_replace_callback('~%(?P[a-zA-Z0-9]{2})~', function($matches) { + return '%' . strtoupper($matches['encoded']); + }, $requestURI); + $requestURL = parse_url($requestURI); $redirect = false; -- 2.20.1