mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +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
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…
Add table
Add a link
Reference in a new issue