Permalink
Browse files

Case-insensitive $_SERVER["HTTPS"] compare

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1346 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent 5df3abb commit 9319b5702ac9ec39813a6fb874cd9c958f0adee4 jakubvrana committed Mar 15, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 adminer/include/bootstrap.inc.php
  2. +1 −1 adminer/include/functions.inc.php
@@ -46,7 +46,7 @@
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
}
@@ -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
}

0 comments on commit 9319b57

Please sign in to comment.