Always set httponly attribute on cookies

This commit is contained in:
Renato Botelho 2014-06-18 07:38:12 -03:00
parent ce9d5d7255
commit fa73c7cd8b

View File

@ -1342,16 +1342,14 @@ function session_auth() {
global $HTTP_SERVER_VARS, $config, $_SESSION, $page;
// Handle HTTPS httponly and secure flags
if($config['system']['webgui']['protocol'] == "https") {
$currentCookieParams = session_get_cookie_params();
session_set_cookie_params(
$currentCookieParams["lifetime"],
$currentCookieParams["path"],
NULL,
true,
true
);
}
$currentCookieParams = session_get_cookie_params();
session_set_cookie_params(
$currentCookieParams["lifetime"],
$currentCookieParams["path"],
NULL,
($config['system']['webgui']['protocol'] == "https"),
true
);
if (!session_id())
session_start();