mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-06 16:36:59 +01:00
* [FIX] Fixes #762. Wrong port replacement when https protocol is forced. Thanks to @lroellin for the feedback.
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -386,7 +386,7 @@ class Util
|
||||
*/
|
||||
public static function getVersion($retBuild = false, $normalized = false)
|
||||
{
|
||||
$build = 17101301;
|
||||
$build = 17101701;
|
||||
$version = [2, 1, 15];
|
||||
|
||||
if ($normalized === true) {
|
||||
|
||||
Reference in New Issue
Block a user