From ecef3971675ec9593206b38227ad26a3a4aae870 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Thu, 4 Jan 2007 22:00:48 +0000 Subject: [PATCH] Fix Windows IIS server cookie login problem, thanks to Shadowin --- docs/NEWS | 3 +++ include/functions_config.inc.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/NEWS b/docs/NEWS index 0d1fa78..b44dabb 100644 --- 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) ------------------------------------------------------------------------ diff --git a/include/functions_config.inc.php b/include/functions_config.inc.php index e03c2d3..5e69e48 100644 --- a/include/functions_config.inc.php +++ b/include/functions_config.inc.php @@ -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; -- 2.39.5