bug fix: rediction to https was called inside shell call
This commit is contained in:
parent
d041bcbeca
commit
06fdadbcd0
|
@ -146,9 +146,12 @@ $db = new DB_system();
|
||||||
// https: Redirection if not calling https://!fqdn or if https is forced
|
// 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")))
|
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)) {
|
||(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on" && $host != $L_FQDN)) {
|
||||||
|
// do not redirect if access is not by HTTP(s)
|
||||||
|
if (isset($_SERVER['REQUEST_URI'])) {
|
||||||
header("Location: https://$L_FQDN".$_SERVER['REQUEST_URI']);
|
header("Location: https://$L_FQDN".$_SERVER['REQUEST_URI']);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Current User ID = the user whose commands are made on behalf of.
|
// Current User ID = the user whose commands are made on behalf of.
|
||||||
$cuid = 0;
|
$cuid = 0;
|
||||||
|
|
Loading…
Reference in New Issue