mirror of
https://github.com/Froxlor/Froxlor.git
synced 2024-09-21 10:27:29 +00:00
Fix "expires" option cannot have a year greater than 9999 (#1246)
This fixes the exception: '"expires" option cannot have a year greater than 9999', which happens on upgrade from Debian 11 to 12. The session timeout in the DB is 9999999999999, so we constrain the value.
This commit is contained in:
parent
76c23cf9b1
commit
7c3e89ccc0
@ -35,6 +35,7 @@ return [
|
||||
'varname' => 'sessiontimeout',
|
||||
'type' => 'number',
|
||||
'min' => 60,
|
||||
'max' => 31536000,
|
||||
'default' => 600,
|
||||
'save_method' => 'storeSettingField'
|
||||
],
|
||||
|
@ -369,7 +369,7 @@ if (CurrentUser::hasSession()) {
|
||||
}
|
||||
// update cookie lifetime
|
||||
$cookie_params = [
|
||||
'expires' => time() + Settings::Get('session.sessiontimeout'),
|
||||
'expires' => time() + min(Settings::Get('session.sessiontimeout'), 31536000),
|
||||
'path' => '/',
|
||||
'domain' => UI::getCookieHost(),
|
||||
'secure' => UI::requestIsHttps(),
|
||||
|
Loading…
Reference in New Issue
Block a user