Title: [279778] trunk
- Revision
- 279778
- Author
- clo...@igalia.com
- Date
- 2021-07-09 04:18:29 -0700 (Fri, 09 Jul 2021)
Log Message
[GTK][WPE][libsoup] Test imported/w3c/web-platform-tests/cookies/samesite/about-blank-toplevel.https.html crashes since it was imported
https://bugs.webkit.org/show_bug.cgi?id=227819
Reviewed by Carlos Garcia Campos.
Source/WebCore:
Add missings null-checks to avoid calling soup_cookie_jar_get_cookie_list_with_same_site_info()
with a null pointer in site_for_cookies argument.
Covered by existing tests.
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::getRawCookies const):
(WebCore::cookiesForSession):
LayoutTests:
Mark the test as passing (is marked as flaky on the general expectations) and add expectation for passing test.
* platform/glib/TestExpectations:
* platform/glib/imported/w3c/web-platform-tests/cookies/samesite/about-blank-toplevel.https-expected.txt: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (279777 => 279778)
--- trunk/LayoutTests/ChangeLog 2021-07-09 08:31:05 UTC (rev 279777)
+++ trunk/LayoutTests/ChangeLog 2021-07-09 11:18:29 UTC (rev 279778)
@@ -1,3 +1,15 @@
+2021-07-09 Carlos Alberto Lopez Perez <clo...@igalia.com>
+
+ [GTK][WPE][libsoup] Test imported/w3c/web-platform-tests/cookies/samesite/about-blank-toplevel.https.html crashes since it was imported
+ https://bugs.webkit.org/show_bug.cgi?id=227819
+
+ Reviewed by Carlos Garcia Campos.
+
+ Mark the test as passing (is marked as flaky on the general expectations) and add expectation for passing test.
+
+ * platform/glib/TestExpectations:
+ * platform/glib/imported/w3c/web-platform-tests/cookies/samesite/about-blank-toplevel.https-expected.txt: Added.
+
2021-07-09 Arcady Goldmints-Orlov <agoldmi...@igalia.com>
[GLIB] Unreviewed test gardening, update baselines after r279723
Modified: trunk/LayoutTests/platform/glib/TestExpectations (279777 => 279778)
--- trunk/LayoutTests/platform/glib/TestExpectations 2021-07-09 08:31:05 UTC (rev 279777)
+++ trunk/LayoutTests/platform/glib/TestExpectations 2021-07-09 11:18:29 UTC (rev 279778)
@@ -270,6 +270,8 @@
imported/w3c/web-platform-tests/fetch/http-cache/basic-auth-cache-test.html [ Pass ]
+imported/w3c/web-platform-tests/cookies/samesite/about-blank-toplevel.https.html [ Pass ]
+
#////////////////////////////////////////////////////////////////////////////////////////
# End of PASSING tests.
#////////////////////////////////////////////////////////////////////////////////////////
@@ -2322,8 +2324,6 @@
webkit.org/b/227665 fast/css/parsing-relative-color-syntax.html [ Failure ]
-webkit.org/b/227819 imported/w3c/web-platform-tests/cookies/samesite/about-blank-toplevel.https.html [ Crash ]
-
webkit.org/b/227823 imported/w3c/web-platform-tests/cookies/prefix/__host.document-cookie.html [ Failure ]
webkit.org/b/227823 imported/w3c/web-platform-tests/cookies/prefix/__host.document-cookie.https.html [ Failure ]
webkit.org/b/227823 imported/w3c/web-platform-tests/cookies/prefix/__host.header.html [ Failure ]
Added: trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/cookies/samesite/about-blank-toplevel.https-expected.txt (0 => 279778)
--- trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/cookies/samesite/about-blank-toplevel.https-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/glib/imported/w3c/web-platform-tests/cookies/samesite/about-blank-toplevel.https-expected.txt 2021-07-09 11:18:29 UTC (rev 279778)
@@ -0,0 +1,3 @@
+
+PASS SameSite cookies with top-level about:blank window
+
Modified: trunk/Source/WebCore/ChangeLog (279777 => 279778)
--- trunk/Source/WebCore/ChangeLog 2021-07-09 08:31:05 UTC (rev 279777)
+++ trunk/Source/WebCore/ChangeLog 2021-07-09 11:18:29 UTC (rev 279778)
@@ -1,3 +1,19 @@
+2021-07-09 Carlos Alberto Lopez Perez <clo...@igalia.com>
+
+ [GTK][WPE][libsoup] Test imported/w3c/web-platform-tests/cookies/samesite/about-blank-toplevel.https.html crashes since it was imported
+ https://bugs.webkit.org/show_bug.cgi?id=227819
+
+ Reviewed by Carlos Garcia Campos.
+
+ Add missings null-checks to avoid calling soup_cookie_jar_get_cookie_list_with_same_site_info()
+ with a null pointer in site_for_cookies argument.
+
+ Covered by existing tests.
+
+ * platform/network/soup/NetworkStorageSessionSoup.cpp:
+ (WebCore::NetworkStorageSession::getRawCookies const):
+ (WebCore::cookiesForSession):
+
2021-07-08 Kate Cheney <katherine_che...@apple.com>
Unreviewed iOS build fix after
Modified: trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp (279777 => 279778)
--- trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp 2021-07-09 08:31:05 UTC (rev 279777)
+++ trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp 2021-07-09 11:18:29 UTC (rev 279778)
@@ -552,6 +552,9 @@
return false;
auto cookieURI = sameSiteInfo.isSameSite ? urlToSoupURI(url) : nullptr;
+ if (!cookieURI)
+ return false;
+
GUniquePtr<GSList> cookies(soup_cookie_jar_get_cookie_list_with_same_site_info(cookieStorage(), uri.get(), firstPartyURI.get(), cookieURI.get(), TRUE, sameSiteInfo.isSafeHTTPMethod, sameSiteInfo.isTopSite));
#else
GUniquePtr<GSList> cookies(soup_cookie_jar_get_cookie_list(cookieStorage(), uri.get(), TRUE));
@@ -592,6 +595,9 @@
return { { }, false };
auto cookieURI = sameSiteInfo.isSameSite ? urlToSoupURI(url) : nullptr;
+ if (!cookieURI)
+ return { { }, false };
+
GSList* cookies = soup_cookie_jar_get_cookie_list_with_same_site_info(session.cookieStorage(), uri.get(), firstPartyURI.get(), cookieURI.get(), forHTTPHeader, sameSiteInfo.isSafeHTTPMethod, sameSiteInfo.isTopSite);
#else
GSList* cookies = soup_cookie_jar_get_cookie_list(session.cookieStorage(), uri.get(), forHTTPHeader);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes