mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +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:
parent
949f5460fb
commit
bf060adcf9
15 changed files with 22 additions and 30 deletions
|
@ -1752,7 +1752,7 @@ void WebDriverConnection::delete_cookies(Optional<StringView> const& name)
|
|||
if (!name.has_value() || name.value() == cookie.name) {
|
||||
// Set the cookie expiry time to a Unix timestamp in the past.
|
||||
cookie.expiry_time = Core::DateTime::from_timestamp(0);
|
||||
m_page_client.page_did_update_cookie(document->url(), move(cookie));
|
||||
m_page_client.page_did_update_cookie(move(cookie));
|
||||
}
|
||||
// -> Otherwise
|
||||
// Do nothing.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue