diff --git a/lib/Froxlor/UI/Panel/UI.php b/lib/Froxlor/UI/Panel/UI.php index d7fc0d25..238baa93 100644 --- a/lib/Froxlor/UI/Panel/UI.php +++ b/lib/Froxlor/UI/Panel/UI.php @@ -92,6 +92,17 @@ class UI */ public static function sendHeaders() { + if (empty($_SERVER['HTTP_HOST'])) { + if (!self::$install_mode) { + // fallback to set hostname in settings + $_SERVER['HTTP_HOST'] = Settings::Get('system.hostname'); + } else { + // bad request + http_response_code(400); + exit(); + } + } + session_set_cookie_params([ 'lifetime' => self::$install_mode ? 7200 : 600, // will be renewed based on settings in lib/init.php 'path' => '/',