Refuse session ids that PHP did not make.
This commit is contained in:
@@ -13,6 +13,8 @@ if (isset($_SERVER['HTTPS'])) {
|
||||
// Browsers use HTTPS for this host for a year, without a plain request first
|
||||
header('Strict-Transport-Security: max-age=31536000');
|
||||
session_cache_limiter('private');
|
||||
// Refuse a session id that PHP did not make, so nobody can plant one
|
||||
ini_set('session.use_strict_mode', '1');
|
||||
session_set_cookie_params(array('lifetime' => 0, 'path' => '/', 'domain' => cookie_domain(), 'secure' => TRUE, 'httponly' => TRUE, 'samesite' => 'Lax'));
|
||||
session_start();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user