From: Alexander Ebert Date: Mon, 30 Mar 2015 13:55:04 +0000 (+0200) Subject: Fixed erroneous redirect on weird webservers X-Git-Tag: 2.1.3~45 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a68fb810056b901d3ad764bb132702569b6500c1;p=GitHub%2FWoltLab%2FWCF.git Fixed erroneous redirect on weird webservers --- 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;