From 26931dd0b29c869d3ad6ccbe699f5ade41e38733 Mon Sep 17 00:00:00 2001 From: Vaidas Lungis Date: Wed, 25 Feb 2015 11:27:56 +0200 Subject: [PATCH] update cookie's httponly param value --- src/bb-library/Box/Session.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/bb-library/Box/Session.php b/src/bb-library/Box/Session.php index 79c67f3c8..f41b0a57c 100644 --- a/src/bb-library/Box/Session.php +++ b/src/bb-library/Box/Session.php @@ -24,6 +24,16 @@ class Box_Session array($handler, 'gc') ); if(php_sapi_name() !== 'cli'){ + $currentCookieParams = session_get_cookie_params(); + $currentCookieParams["httponly"] = true; + + session_set_cookie_params( + $currentCookieParams["lifetime"], + $currentCookieParams["path"], + $currentCookieParams["domain"], + $currentCookieParams["secure"], + $currentCookieParams["httponly"] + ); session_start(); } }