Compare commits
No commits in common. "1c3238e64e5cef3385c69bbfaecab6a7dff248af" and "6cb9e17ddfd1ad33adb84232d2457a06e6e078b6" have entirely different histories.
1c3238e64e
...
6cb9e17ddf
14
web.php
14
web.php
@ -74,23 +74,13 @@ if (isset($_COOKIE['COOKIES_CONSENT'])) {
|
|||||||
|
|
||||||
session_set_save_handler(Container::$sessionHandler, true);
|
session_set_save_handler(Container::$sessionHandler, true);
|
||||||
session_start([
|
session_start([
|
||||||
|
'gc_maxlifetime' => 604800,
|
||||||
'gc_probability' => 0, // old sessions are deleted by MaintainDatabaseCommand
|
'gc_probability' => 0, // old sessions are deleted by MaintainDatabaseCommand
|
||||||
'cookie_lifetime' => 604800,
|
'cookie_lifetime' => 604800, // TODO: cookie is not renewed so session can be lost
|
||||||
'cookie_path' => '/',
|
|
||||||
'cookie_httponly' => true,
|
'cookie_httponly' => true,
|
||||||
'cookie_samesite' => 'Lax'
|
'cookie_samesite' => 'Lax'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (isset($_COOKIE[session_name()])) {
|
|
||||||
// extend session cookie lifetime is cookie already exists
|
|
||||||
setcookie(session_name(), session_id(), [
|
|
||||||
'expires' => time() + 604800,
|
|
||||||
'path' => '/',
|
|
||||||
'httponly' => true,
|
|
||||||
'samesite' => 'Lax'
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// this is needed to handle old type of session IDs
|
// this is needed to handle old type of session IDs
|
||||||
if (!Container::$sessionHandler->validateId(session_id())) {
|
if (!Container::$sessionHandler->validateId(session_id())) {
|
||||||
session_regenerate_id(true);
|
session_regenerate_id(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user