Author: Lars Michelsen <[email protected]> Date: Thu Jun 5 18:40:05 2014 +0200 Committer: Lars Michelsen <[email protected]> Commit-Date: Thu Jun 5 18:40:05 2014 +0200
Fixed code formating and bug in new sesscookie params --- ChangeLog | 2 + share/server/core/classes/CoreSessionHandler.php | 4 +- share/server/core/classes/GlobalMainCfg.php | 26 +++++++++++---------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b7bffb..00f3a29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 1.8b5 Frontend: + * Add support for secure and httponly cookies (sesscookiehttponly, sesscookiesecure) + (Thanks to [email protected] for the patch) * FIX: Fixed links of rotation steps (always linking to last step) 1.8b4 diff --git a/share/server/core/classes/CoreSessionHandler.php b/share/server/core/classes/CoreSessionHandler.php index b5f685d..2de2113 100644 --- a/share/server/core/classes/CoreSessionHandler.php +++ b/share/server/core/classes/CoreSessionHandler.php @@ -34,8 +34,8 @@ class CoreSessionHandler { $sDomain = cfg('global', 'sesscookiedomain'); $sPath = cfg('global', 'sesscookiepath'); $iDuration = cfg('global', 'sesscookieduration'); - $bSecure = cfg('global', 'sesscookiesecure'); - $bHTTPOnly = cfg('global', 'sesscookiehttponly'); + $bSecure = cfg('global', 'sesscookiesecure') == 1; + $bHTTPOnly = cfg('global', 'sesscookiehttponly') == 1; // Set the session name (used in params/cookie names) session_name(SESSION_NAME); diff --git a/share/server/core/classes/GlobalMainCfg.php b/share/server/core/classes/GlobalMainCfg.php index 60ece08..24c047a 100644 --- a/share/server/core/classes/GlobalMainCfg.php +++ b/share/server/core/classes/GlobalMainCfg.php @@ -273,18 +273,20 @@ class GlobalMainCfg { 'editable' => 1, 'default' => '86400', 'match' => MATCH_STRING), - 'sesscookiesecure' => Array( - 'must' => 0, - 'editable' => 1, - 'default' => '0', - 'match' => MATCH_BOOLEAN - ), - 'sesscookiehttponly' => Array( - 'must' => 0, - 'editable' => 1, - 'default' => '0', - 'match' => MATCH_BOOLEAN - ), + 'sesscookiesecure' => Array( + 'must' => 0, + 'editable' => 1, + 'default' => 0, + 'field_type' => 'boolean', + 'match' => MATCH_BOOLEAN + ), + 'sesscookiehttponly' => Array( + 'must' => 0, + 'editable' => 1, + 'default' => 0, + 'field_type' => 'boolean', + 'match' => MATCH_BOOLEAN + ), 'shinken_features' => Array('must' => 1, 'editable' => 1, 'default' => '0', ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
