mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Always set httponly attribute on cookies
This commit is contained in:
parent
ce9d5d7255
commit
fa73c7cd8b
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user