[webkit-changes] [WebKit/WebKit] cd981f: Add error-checking for no arguments, empty options...
Rupin Mittal
noreply at github.com
Mon Sep 9 17:01:54 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cd981fa847062f9a7164e2643c3d90b5a257286d
https://github.com/WebKit/WebKit/commit/cd981fa847062f9a7164e2643c3d90b5a257286d
Author: Rupin Mittal <rupin at apple.com>
Date: 2024-09-09 (Mon, 09 Sep 2024)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/cookie-store/cookieStore_get_arguments.https.any-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/cookie-store/cookieStore_get_arguments.https.any.serviceworker-expected.txt
M Source/WebCore/Modules/cookie-store/CookieStore.cpp
Log Message:
-----------
Add error-checking for no arguments, empty options and invalid URLs in CookieStore::get()
https://bugs.webkit.org/show_bug.cgi?id=279230
rdar://135373104
Reviewed by Sihui Liu.
The Cookie Store API spec specifies that if CookieStore::get()
is called with no options, a TypeError should be returned.
Also, if a URL is passed in, return TypeError if either:
(1) The global object is a Window and the URL is not the same as
the complete URL for this context (Window's base URL + URL)
(2) The complete URL for this context and URL do not have the
same origin
See (https://wicg.github.io/cookie-store/#CookieStore-get)
We already do this URL checking in CookieStore::getAll(), so
we re-use the logic here.
* LayoutTests/imported/w3c/web-platform-tests/cookie-store/cookieStore_get_arguments.https.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/cookie-store/cookieStore_get_arguments.https.any.serviceworker-expected.txt:
* Source/WebCore/Modules/cookie-store/CookieStore.cpp:
(WebCore::CookieStore::get):
Canonical link: https://commits.webkit.org/283374@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list