diff --git a/adminer/include/bootstrap.inc.php b/adminer/include/bootstrap.inc.php index 2fa3bcf1..ec4d19d0 100644 --- a/adminer/include/bootstrap.inc.php +++ b/adminer/include/bootstrap.inc.php @@ -46,7 +46,7 @@ if (!isset($_SERVER["REQUEST_URI"])) { session_write_close(); // disable session.auto_start @ini_set("session.use_trans_sid", false); // protect links in export, @ - may be disabled session_name("adminer_sid"); // use specific session name to get own namespace -$params = array(0, preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]), "", $_SERVER["HTTPS"] && $_SERVER["HTTPS"] != "off"); +$params = array(0, preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]), "", $_SERVER["HTTPS"] && strcasecmp($_SERVER["HTTPS"], "off")); if (version_compare(PHP_VERSION, '5.2.0') >= 0) { $params[] = true; // HttpOnly } diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index c1424cba..4bd87605 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -201,7 +201,7 @@ function where_link($i, $column, $value) { * @return bool */ function cookie($name, $value) { - $params = array($name, $value, time() + 2592000, preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]), "", $_SERVER["HTTPS"] && $_SERVER["HTTPS"] != "off"); // 2592000 = 30 * 24 * 60 * 60 + $params = array($name, $value, time() + 2592000, preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]), "", $_SERVER["HTTPS"] && strcasecmp($_SERVER["HTTPS"], "off")); // 2592000 = 30 * 24 * 60 * 60 if (version_compare(PHP_VERSION, '5.2.0') >= 0) { $params[] = true; // HttpOnly }