mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-30 05:09:06 +02:00
#8724 - Session timeout regression
Only emit the session refresh cookie if the session timeout is set.
This commit is contained in:
parent
af08328e8e
commit
c28670ebed
@ -325,9 +325,9 @@ class Session
|
|||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
// Session start emits a cookie, but only if there's no existing session. If there is a session tied to
|
// Session start emits a cookie, but only if there's no existing session. If there is a session timeout
|
||||||
// this request, make sure the session is held for the entire timeout by refreshing the cookie age.
|
// tied to this request, make sure the session is held for the entire timeout by refreshing the cookie age.
|
||||||
if ($this->requestContainsSessionId($request)) {
|
if ($timeout && $this->requestContainsSessionId($request)) {
|
||||||
Cookie::set(session_name(), session_id(), $timeout / 86400, $path, $domain ?: null, $secure, true);
|
Cookie::set(session_name(), session_id(), $timeout / 86400, $path, $domain ?: null, $secure, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user