From b304cbca2f2953f56b020b222586e2bbdab935f6 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" <51850998+paulbalandan@users.noreply.github.com> Date: Tue, 23 Aug 2022 13:27:57 +0800 Subject: [PATCH] Set cookie max Expires to 400 days --- system/Cookie/Cookie.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/Cookie/Cookie.php b/system/Cookie/Cookie.php index 22c01a7daa3c..2b46a7613479 100644 --- a/system/Cookie/Cookie.php +++ b/system/Cookie/Cookie.php @@ -461,12 +461,14 @@ public function withExpired() /** * {@inheritDoc} + * + * @see https://httpwg.org/http-extensions/draft-ietf-httpbis-rfc6265bis.html#section-4.1.2.1 */ public function withNeverExpiring() { $cookie = clone $this; - $cookie->expires = time() + 5 * YEAR; + $cookie->expires = time() + 400 * DAY; return $cookie; }