]> git.mjollnir.org Git - s9y.git/commitdiff
Fix Windows IIS server cookie login problem, thanks to Shadowin
authorgarvinhicking <garvinhicking>
Thu, 4 Jan 2007 22:00:48 +0000 (22:00 +0000)
committergarvinhicking <garvinhicking>
Thu, 4 Jan 2007 22:00:48 +0000 (22:00 +0000)
docs/NEWS
include/functions_config.inc.php

index 0d1fa7830a6d141d734f75821348a8da62c4a113..b44dabbc3faadb7eb2709629f8d0673321a1f40c 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,9 @@
 Version 1.1.1 ()
 ------------------------------------------------------------------------
 
+    * Fix a bug in sending the right login session cookies on Windows IIS
+      servers. Major thanks to Shadowin from the forums!
+          
 Version 1.1 (December 28th, 2006)
 ------------------------------------------------------------------------
 
index e03c2d37911fd6baadca917ada4c31fbd7c33bdf..5e69e485b5c29f7fcc614ce01ca386b42309380c 100644 (file)
@@ -563,7 +563,7 @@ function serendipity_JSsetCookie($name, $value) {
 function serendipity_setCookie($name,$value) {
     global $serendipity;
 
-    $secure = !empty($_SERVER['HTTPS']) ? true : false;
+    $secure = (strtolower($_SERVER['HTTPS']) == 'on') ? true : false;
     setcookie("serendipity[$name]", $value, time()+60*60*24*30, $serendipity['serendipityHTTPPath'], $_SERVER['HTTP_HOST'], $secure);
     $_COOKIE[$name] = $value;
     $serendipity['COOKIE'][$name] = $value;