mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG: Fix for Cookie expiry timeout being passed as a large number on 64 bit machines
This commit is contained in:
parent
a4189a6744
commit
dff5447cbc
@ -523,9 +523,11 @@ class Session {
|
|||||||
|
|
||||||
if(!session_id() && !headers_sent()) {
|
if(!session_id() && !headers_sent()) {
|
||||||
if($domain) {
|
if($domain) {
|
||||||
session_set_cookie_params($timeout, $path, $domain, $secure /* secure */, true /* httponly */);
|
session_set_cookie_params($timeout, $path, $domain,
|
||||||
|
$secure /* secure */, true /* httponly */);
|
||||||
} else {
|
} else {
|
||||||
session_set_cookie_params($timeout, $path, null, $secure /* secure */, true /* httponly */);
|
session_set_cookie_params($timeout, $path, null,
|
||||||
|
$secure /* secure */, true /* httponly */);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow storing the session in a non standard location
|
// Allow storing the session in a non standard location
|
||||||
@ -541,7 +543,8 @@ class Session {
|
|||||||
// Modify the timeout behaviour so it's the *inactive* time before the session expires.
|
// Modify the timeout behaviour so it's the *inactive* time before the session expires.
|
||||||
// By default it's the total session lifetime
|
// By default it's the total session lifetime
|
||||||
if($timeout && !headers_sent()) {
|
if($timeout && !headers_sent()) {
|
||||||
Cookie::set(session_name(), session_id(), time()+$timeout, $path, $domain ? $domain : null, $secure, true);
|
Cookie::set(session_name(), session_id(), $timeout/86400, $path, $domain ? $domain
|
||||||
|
: null, $secure, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user