mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:47:35 +00:00
Browser+LibWeb+WebContent: Store cookie expiry times in UTC
We are currently converting parsed expiry times to local time, whereas the RFC dictates we parse them as UTC. When expiring cookies, we must also use the current UTC time to compare against the cookies' expiry times.
This commit is contained in:
parent
1858163d3c
commit
87c4080d00
8 changed files with 83 additions and 47 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Tim Flynn <trflynn89@serenityos.org>
|
||||
* Copyright (c) 2021-2023, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -7,7 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <LibCore/DateTime.h>
|
||||
#include <AK/Time.h>
|
||||
#include <LibIPC/Forward.h>
|
||||
|
||||
namespace Web::Cookie {
|
||||
|
@ -25,12 +25,16 @@ enum class Source {
|
|||
};
|
||||
|
||||
struct Cookie {
|
||||
DeprecatedString creation_time_to_string() const;
|
||||
DeprecatedString last_access_time_to_string() const;
|
||||
DeprecatedString expiry_time_to_string() const;
|
||||
|
||||
DeprecatedString name;
|
||||
DeprecatedString value;
|
||||
SameSite same_site;
|
||||
Core::DateTime creation_time {};
|
||||
Core::DateTime last_access_time {};
|
||||
Core::DateTime expiry_time {};
|
||||
Time creation_time {};
|
||||
Time last_access_time {};
|
||||
Time expiry_time {};
|
||||
DeprecatedString domain {};
|
||||
DeprecatedString path {};
|
||||
bool secure { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue