diff options
author | Stefan Giehl <stefan@matomo.org> | 2022-02-21 00:31:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-21 00:31:26 +0300 |
commit | 2e1c781e0d95ed757b89b08f4b4dccea48164abb (patch) | |
tree | d018fa5eb2d0128760078e3520cf150ca7d2c640 /core | |
parent | 6b1dd1f079a239206288b111bf4063db0b0d4a70 (diff) |
Fix cookies with session lifetime (#18820)
Diffstat (limited to 'core')
-rw-r--r-- | core/Cookie.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/Cookie.php b/core/Cookie.php index ed7d1351ad..6ce81416e4 100644 --- a/core/Cookie.php +++ b/core/Cookie.php @@ -146,7 +146,10 @@ class Cookie } } - $Expires = $this->formatExpireTime($Expires); + // Format expire time only for non session cookies + if (0 !== $Expires) { + $Expires = $this->formatExpireTime($Expires); + } $header = 'Set-Cookie: ' . rawurlencode($Name) . '=' . rawurlencode($Value) . (empty($Expires) ? '' : '; expires=' . $Expires) |