1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:37:34 +00:00

Browser+LibWebView+WebContent: Do not domain match on cookie updates

Updating cookies through these hooks happens in one of two manners:
1. Through the Browser's storage inspector.
2. Through WebDriver's delete-cookies operation.

In (1), we should not restrict ourselves to being able to delete cookies
for the current page. For example, it's handy to open the inspector from
the welcome page and be able to delete cookies for any domain.

In (2), we already are only interacting with cookies that have been
matched against the document URL.
This commit is contained in:
Timothy Flynn 2022-11-28 11:24:04 -05:00 committed by Andreas Kling
parent 949f5460fb
commit bf060adcf9
15 changed files with 22 additions and 30 deletions

View file

@ -182,7 +182,7 @@ public:
virtual Optional<Web::Cookie::Cookie> page_did_request_named_cookie(AK::URL const&, DeprecatedString const&) { return {}; }
virtual DeprecatedString page_did_request_cookie(const AK::URL&, Cookie::Source) { return {}; }
virtual void page_did_set_cookie(const AK::URL&, Cookie::ParsedCookie const&, Cookie::Source) { }
virtual void page_did_update_cookie(AK::URL const&, Web::Cookie::Cookie) { }
virtual void page_did_update_cookie(Web::Cookie::Cookie) { }
virtual void page_did_update_resource_count(i32) { }
virtual void page_did_close_browsing_context(HTML::BrowsingContext const&) { }