From 967c1cc48f2d778e11b144aff6099a5fd942c816 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Tue, 28 Jan 2014 09:25:20 +0100 Subject: [PATCH] [FIX] Proper HTTPS detection Fixes #1618 once merged --- public/include/pages/login.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/include/pages/login.inc.php b/public/include/pages/login.inc.php index ee4e47d4..80267049 100644 --- a/public/include/pages/login.inc.php +++ b/public/include/pages/login.inc.php @@ -28,7 +28,7 @@ if ($setting->getValue('maintenance') && !$user->isAdmin($user->getUserIdByEmail if (!$config['csrf']['enabled'] || $config['csrf']['enabled'] && $csrftoken->valid) { if ($user->checkLogin(@$_POST['username'], @$_POST['password']) ) { $port = ($_SERVER["SERVER_PORT"] == "80" or $_SERVER["SERVER_PORT"] == "443") ? "" : (":".$_SERVER["SERVER_PORT"]); - $location = @$_SERVER['HTTPS'] === true ? 'https://' : 'http://'; + $location = @$_SERVER['HTTPS'] ? 'https://' : 'http://'; $location .= $_SERVER['SERVER_NAME'] . $port . $_SERVER['SCRIPT_NAME'] . '?page=dashboard'; if (!headers_sent()) header('Location: ' . $location); exit('');