diff --git a/inc/SP/Util/HttpUtil.class.php b/inc/SP/Util/HttpUtil.class.php index fd5557b3b..4750fa243 100644 --- a/inc/SP/Util/HttpUtil.class.php +++ b/inc/SP/Util/HttpUtil.class.php @@ -39,10 +39,12 @@ class HttpUtil public static function checkHttps() { if (Checks::forceHttpsIsEnabled() && !Checks::httpsEnabled()) { - $port = ((int)$_SERVER['SERVER_PORT'] !== 443) ? ':' . $_SERVER['SERVER_PORT'] : ''; - $host = str_replace('http', 'https', self::getHttpHost()); + $serverPort = (int)$_SERVER['SERVER_PORT']; - header('Location: ' . $host . $port . $_SERVER['REQUEST_URI']); + $httpPort = $serverPort !== 443 && $serverPort !== 80 ? $serverPort : ''; + $httpHost = str_replace('http', 'https', self::getHttpHost()); + + header('Location: ' . $httpHost . ':' . $httpPort . $_SERVER['REQUEST_URI']); } } diff --git a/inc/SP/Util/Util.class.php b/inc/SP/Util/Util.class.php index e57b0db81..e0d4b4737 100644 --- a/inc/SP/Util/Util.class.php +++ b/inc/SP/Util/Util.class.php @@ -386,7 +386,7 @@ public static function getAppInfo($index = null) */ public static function getVersion($retBuild = false, $normalized = false) { - $build = 17101301; + $build = 17101701; $version = [2, 1, 15]; if ($normalized === true) {