From 0c2aaafefc0a62ac70db04336e8e66e696aeecb4 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Thu, 13 Dec 2012 16:05:34 -0500 Subject: [PATCH] Fixed issue with nginx HTTPS global Variable was set to an empty string and being evaluated as true. --- classes/Browser.php | 2 +- jar.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Browser.php b/classes/Browser.php index ac25498..17fb69f 100644 --- a/classes/Browser.php +++ b/classes/Browser.php @@ -53,7 +53,7 @@ class Browser { if (strpos($destination, '://') === false) { - $destination = 'http' . ((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') ? '' : 's') . '://' . $_SERVER['HTTP_HOST'] . $destination; + $destination = 'http' . ((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off' || $_SERVER['HTTPS'] == '') ? '' : 's') . '://' . $_SERVER['HTTP_HOST'] . $destination; } header('Location: ' . $destination); diff --git a/jar.php b/jar.php index 76003a6..0950cee 100755 --- a/jar.php +++ b/jar.php @@ -358,7 +358,7 @@ class Browser { if (strpos($destination, '://') === false) { - $destination = 'http' . ((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') ? '' : 's') . '://' . $_SERVER['HTTP_HOST'] . $destination; + $destination = 'http' . ((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off' || $_SERVER['HTTPS'] == '') ? '' : 's') . '://' . $_SERVER['HTTP_HOST'] . $destination; } header('Location: ' . $destination);