diff options
author | bfabiszewski <github@ushuaia.pl> | 2014-03-05 20:12:36 +0100 |
---|---|---|
committer | bfabiszewski <github@ushuaia.pl> | 2014-03-05 20:12:36 +0100 |
commit | 9e42c79bbc26c8730a5aade8fbed73750f98fdbd (patch) | |
tree | 2d5b505d90b94cd091c432387f1dcb567870d658 /auth.php | |
parent | bc0aac55c50260ae1dc26effc6323f37c6acc096 (diff) | |
download | RunnerUpLive-9e42c79bbc26c8730a5aade8fbed73750f98fdbd.zip |
HTTPS detection on IIS
Diffstat (limited to 'auth.php')
-rwxr-xr-x | auth.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -40,7 +40,7 @@ if ($require_authentication) { $auth = (isset($_SESSION['auth']) ? $_SESSION['auth'] : ""); $user = (isset($_REQUEST['user']) ? $_REQUEST['user'] : ""); $pass = (isset($_REQUEST['pass']) ? md5($salt.$_REQUEST['pass']) : ""); - @$ssl = ($_SERVER['HTTPS'] == "" ? "http" : "https"); + $ssl = ((!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "" || $_SERVER['HTTPS'] == "off") ? "http" : "https"); $auth_error = (isset($_REQUEST['auth_error']) ? $_REQUEST['auth_error'] : 0); // not authenticated and username not submited |