[adminer-svn] SF.net SVN: adminer:[1283] trunk/adminer/include/functions.inc.php
Database management in a single PHP file
Brought to you by:
jakubvrana
From: <jak...@us...> - 2009-12-18 18:00:06
|
Revision: 1283 http://adminer.svn.sourceforge.net/adminer/?rev=1283&view=rev Author: jakubvrana Date: 2009-12-18 17:59:58 +0000 (Fri, 18 Dec 2009) Log Message: ----------- Secure cookies Modified Paths: -------------- trunk/adminer/include/functions.inc.php Modified: trunk/adminer/include/functions.inc.php =================================================================== --- trunk/adminer/include/functions.inc.php 2009-12-18 17:49:21 UTC (rev 1282) +++ trunk/adminer/include/functions.inc.php 2009-12-18 17:59:58 UTC (rev 1283) @@ -201,7 +201,11 @@ * @return bool */ function cookie($name, $value) { - return setcookie($name, $value, time() + 2592000, preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"])); // 2592000 = 30 * 24 * 60 * 60 + $params = array($name, $value, time() + 2592000, preg_replace('~\\?.*~', '', ME), "", (bool) $_SERVER["HTTPS"]); // 2592000 = 30 * 24 * 60 * 60 + if (version_compare(PHP_VERSION, '5.2.0') >= 0) { + $params[] = true; // HttpOnly + } + return call_user_func_array('setcookie', $params); } /** Restart stopped session This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |