From d041bcbecae9e2e6fcdac2438696afe8c46c4350 Mon Sep 17 00:00:00 2001 From: Remi Date: Thu, 3 Mar 2016 16:06:38 +0100 Subject: [PATCH] fix test if variables is set --- bureau/class/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bureau/class/config.php b/bureau/class/config.php index 1149e504..1e0e5ef7 100644 --- a/bureau/class/config.php +++ b/bureau/class/config.php @@ -144,7 +144,7 @@ class DB_system extends DB_Sql { $db = new DB_system(); // https: Redirection if not calling https://!fqdn or if https is forced -if ((variable_get('force_https', '0', "This variable is set to 0 (default) if users can access the management desktop through HTTP, otherwise we force HTTPS")&&( $_SERVER["HTTPS"] != "on")) +if ((variable_get('force_https', '0', "This variable is set to 0 (default) if users can access the management desktop through HTTP, otherwise we force HTTPS")&&(!isset($_SERVER["HTTPS"])|| ($_SERVER["HTTPS"] != "on"))) ||(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on" && $host != $L_FQDN)) { header("Location: https://$L_FQDN".$_SERVER['REQUEST_URI']); exit;