From 06fdadbcd08e95b78675701fd80a17520ff61e4e Mon Sep 17 00:00:00 2001 From: Remi Date: Thu, 3 Mar 2016 16:20:41 +0100 Subject: [PATCH] bug fix: rediction to https was called inside shell call --- bureau/class/config.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bureau/class/config.php b/bureau/class/config.php index 1e0e5ef7..323ebabd 100644 --- a/bureau/class/config.php +++ b/bureau/class/config.php @@ -146,8 +146,11 @@ $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")&&(!isset($_SERVER["HTTPS"])|| ($_SERVER["HTTPS"] != "on"))) ||(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on" && $host != $L_FQDN)) { - header("Location: https://$L_FQDN".$_SERVER['REQUEST_URI']); - exit; + // do not redirect if access is not by HTTP(s) + if (isset($_SERVER['REQUEST_URI'])) { + header("Location: https://$L_FQDN".$_SERVER['REQUEST_URI']); + exit; + } } // Current User ID = the user whose commands are made on behalf of.