mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
Browser: Change value of "the latest representable date" for cookies
Setting the year to NumericLimits<unsigned>::max() resulted in the following datetime: -2-12-31 00:00:00. Instead, set the latest datetime to the last second of the year 9999.
This commit is contained in:
parent
5496d71e4a
commit
d363ed8872
Notes:
sideshowbarker
2024-07-18 20:27:41 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/d363ed88723 Pull-request: https://github.com/SerenityOS/serenity/pull/6272 Reviewed-by: https://github.com/gmta
1 changed files with 1 additions and 2 deletions
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "CookieJar.h"
|
||||
#include <AK/AllOf.h>
|
||||
#include <AK/NumericLimits.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/URL.h>
|
||||
#include <ctype.h>
|
||||
|
@ -180,7 +179,7 @@ Optional<Cookie> CookieJar::parse_cookie(const String& cookie_string, String def
|
|||
// 6. The cookie-name is the name string, and the cookie-value is the value string.
|
||||
Cookie cookie { name, value };
|
||||
|
||||
cookie.expiry_time = Core::DateTime::create(AK::NumericLimits<unsigned>::max());
|
||||
cookie.expiry_time = Core::DateTime::create(9999, 12, 31, 23, 59, 59);
|
||||
cookie.domain = move(default_domain);
|
||||
cookie.path = move(default_path);
|
||||
|
||||
|
|
Loading…
Reference in a new issue