LibWeb+LibWebView: Implement the latest cookie draft RFC

We currently implement the official cookie RFC, which was last updated
in 2011. Unfortunately, web reality conflicts with the RFC. For example,
all of the major browsers allow nameless cookies, which the RFC forbids.

There has since been draft versions of the RFC published to address such
issues. This patch implements the latest draft.

Major differences include:
* Allowing nameless or valueless (but not both) cookies
* Formal cookie length limits
* Formal same-site rules (not fully implemented here)
* More rules around cookie domains
This commit is contained in:
Timothy Flynn 2024-09-16 15:20:01 -04:00 committed by Tim Ledbetter
commit fce003a8f5
Notes: github-actions[bot] 2024-09-16 23:05:30 +00:00
7 changed files with 548 additions and 176 deletions

View file

@ -27,6 +27,7 @@ struct ParsedCookie {
};
Optional<ParsedCookie> parse_cookie(StringView cookie_string);
bool cookie_contains_invalid_control_character(StringView);
}