[geeklog-cvs] geeklog: setcookie() "httponly" parameter available as of PHP 5....
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Nov 6 08:37:27 EDT 2010
changeset 8014:38351c0d9042
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/38351c0d9042
user: Dirk Haun <dirk at haun-online.de>
date: Sat Nov 06 13:11:58 2010 +0100
description:
setcookie() "httponly" parameter available as of PHP 5.2.0 (feature request #0001217)
diffstat:
system/lib-security.php | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
diffs (29 lines):
diff -r 059fe7249f07 -r 38351c0d9042 system/lib-security.php
--- a/system/lib-security.php Sat Nov 06 13:10:13 2010 +0100
+++ b/system/lib-security.php Sat Nov 06 13:11:58 2010 +0100
@@ -2,7 +2,7 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.7 |
+// | Geeklog 1.8 |
// +---------------------------------------------------------------------------+
// | lib-security.php |
// | |
@@ -1478,15 +1478,7 @@
$secure = $_CONF['cookiesecure'];
}
- // the httponly parameter is only available as of PHP 5.2.0
- if (version_compare(PHP_VERSION, '5.2.0', '>=')) {
- $retval = setcookie($name, $value, $expire, $path, $domain, $secure,
- true);
- } else {
- // fake it for older PHP versions; kudos to Matt Mecham
- $retval = setcookie($name, $value, $expire, $path,
- $domain . '; httponly', $secure);
- }
+ $retval = setcookie($name, $value, $expire, $path, $domain, $secure, true);
return $retval;
}
More information about the geeklog-cvs
mailing list