Title: [253431] trunk
Revision
253431
Author
[email protected]
Date
2019-12-12 09:51:29 -0800 (Thu, 12 Dec 2019)

Log Message

[SOUP] Use new API for strict secure cookies
https://bugs.webkit.org/show_bug.cgi?id=169356

Reviewed by Michael Catanzaro.

Source/WebCore:

The new soup API implements this spec:

https://tools.ietf.org/html/draft-ietf-httpbis-cookie-alone-01

* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::setCookiesFromDOM const):
(WebCore::NetworkStorageSession::setCookies):

Tools:

Update libsoup to fix a secure cookie test

* gtk/jhbuild.modules:
* wpe/jhbuild.modules:

LayoutTests:

Remove expected failures for secure cookie tests

* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (253430 => 253431)


--- trunk/LayoutTests/ChangeLog	2019-12-12 17:49:48 UTC (rev 253430)
+++ trunk/LayoutTests/ChangeLog	2019-12-12 17:51:29 UTC (rev 253431)
@@ -1,3 +1,15 @@
+2019-12-12  Patrick Griffis  <[email protected]>
+
+        [SOUP] Use new API for strict secure cookies
+        https://bugs.webkit.org/show_bug.cgi?id=169356
+
+        Reviewed by Michael Catanzaro.
+
+        Remove expected failures for secure cookie tests
+
+        * platform/gtk/TestExpectations:
+        * platform/wpe/TestExpectations:
+
 2019-12-12  Truitt Savell  <[email protected]>
 
         REGRESSION: (r251677) imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-double-submit-3.html is a flakey failure

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (253430 => 253431)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2019-12-12 17:49:48 UTC (rev 253430)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2019-12-12 17:51:29 UTC (rev 253431)
@@ -3978,8 +3978,6 @@
 webkit.org/b/204675 imported/w3c/web-platform-tests/offscreen-canvas/the-offscreen-canvas/initial.reset.pattern.worker.html [ Failure ]
 webkit.org/b/204675 imported/w3c/web-platform-tests/offscreen-canvas/filter/offscreencanvas.filter.w.html [ Missing ]
 
-webkit.org/b/169356 imported/w3c/web-platform-tests/cookies/secure/set-from-dom.sub.html [ Failure ]
-
 #////////////////////////////////////////////////////////////////////////////////////////
 # End of non-crashing, non-flaky tests failing
 #////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/LayoutTests/platform/wpe/TestExpectations (253430 => 253431)


--- trunk/LayoutTests/platform/wpe/TestExpectations	2019-12-12 17:49:48 UTC (rev 253430)
+++ trunk/LayoutTests/platform/wpe/TestExpectations	2019-12-12 17:51:29 UTC (rev 253431)
@@ -500,8 +500,6 @@
 webkit.org/b/200165 imported/w3c/web-platform-tests/websockets/cookies/007.html [ Failure ]
 webkit.org/b/200165 imported/w3c/web-platform-tests/websockets/cookies/004.html [ Failure ]
 
-webkit.org/b/169356 imported/w3c/web-platform-tests/cookies/secure/set-from-dom.sub.html [ Failure ]
-
 #////////////////////////////////////////////////////////////////////////////////////////
 # 3. UNRESOLVED TESTS
 #////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/Source/WebCore/ChangeLog (253430 => 253431)


--- trunk/Source/WebCore/ChangeLog	2019-12-12 17:49:48 UTC (rev 253430)
+++ trunk/Source/WebCore/ChangeLog	2019-12-12 17:51:29 UTC (rev 253431)
@@ -1,3 +1,18 @@
+2019-12-12  Patrick Griffis  <[email protected]>
+
+        [SOUP] Use new API for strict secure cookies
+        https://bugs.webkit.org/show_bug.cgi?id=169356
+
+        Reviewed by Michael Catanzaro.
+
+        The new soup API implements this spec:
+
+        https://tools.ietf.org/html/draft-ietf-httpbis-cookie-alone-01
+
+        * platform/network/soup/NetworkStorageSessionSoup.cpp:
+        (WebCore::NetworkStorageSession::setCookiesFromDOM const):
+        (WebCore::NetworkStorageSession::setCookies):
+
 2019-12-12  Don Olmstead  <[email protected]>
 
         [CMake] Add LibPSL::LibPSL target

Modified: trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp (253430 => 253431)


--- trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp	2019-12-12 17:49:48 UTC (rev 253430)
+++ trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp	2019-12-12 17:51:29 UTC (rev 253431)
@@ -291,16 +291,28 @@
         if (httpOnlyCookieExists(existingCookies, soup_cookie_get_name(cookie.get()), soup_cookie_get_path(cookie.get())))
             continue;
 
+#if SOUP_CHECK_VERSION(2, 67, 1)
+        soup_cookie_jar_add_cookie_full(jar, cookie.release(), origin.get(), firstPartyURI.get());
+#else
         soup_cookie_jar_add_cookie_with_first_party(jar, firstPartyURI.get(), cookie.release());
+#endif
     }
 
     soup_cookies_free(existingCookies);
 }
 
-void NetworkStorageSession::setCookies(const Vector<Cookie>& cookies, const URL&, const URL&)
+void NetworkStorageSession::setCookies(const Vector<Cookie>& cookies, const URL& url, const URL& firstParty)
 {
-    for (auto cookie : cookies)
+    for (auto cookie : cookies) {
+#if SOUP_CHECK_VERSION(2, 67, 1)
+        GUniquePtr<SoupURI> origin = urlToSoupURI(url);
+        GUniquePtr<SoupURI> firstPartyURI = urlToSoupURI(firstParty);
+
+        soup_cookie_jar_add_cookie_full(cookieStorage(), cookie.toSoupCookie(), origin.get(), firstPartyURI.get());
+#else
         soup_cookie_jar_add_cookie(cookieStorage(), cookie.toSoupCookie());
+#endif
+    }
 }
 
 void NetworkStorageSession::setCookie(const Cookie& cookie)

Modified: trunk/Tools/ChangeLog (253430 => 253431)


--- trunk/Tools/ChangeLog	2019-12-12 17:49:48 UTC (rev 253430)
+++ trunk/Tools/ChangeLog	2019-12-12 17:51:29 UTC (rev 253431)
@@ -1,3 +1,15 @@
+2019-12-12  Patrick Griffis  <[email protected]>
+
+        [SOUP] Use new API for strict secure cookies
+        https://bugs.webkit.org/show_bug.cgi?id=169356
+
+        Reviewed by Michael Catanzaro.
+
+        Update libsoup to fix a secure cookie test
+
+        * gtk/jhbuild.modules:
+        * wpe/jhbuild.modules:
+
 2019-12-11  Jonathan Bedard  <[email protected]>
 
         Python 3: Support serial ServerProcess tests

Modified: trunk/Tools/gtk/jhbuild.modules (253430 => 253431)


--- trunk/Tools/gtk/jhbuild.modules	2019-12-12 17:49:48 UTC (rev 253430)
+++ trunk/Tools/gtk/jhbuild.modules	2019-12-12 17:51:29 UTC (rev 253431)
@@ -230,7 +230,7 @@
             hash="sha256:f8fd0aeb66252dfcc638f14d9be1e2362fdaf2ca86bde0444ff4d5cc961b560f"/>
   </autotools>
 
-  <meson id="libsoup" mesonargs="-Dintrospection=false -Dgssapi=false -Dvapi=false">
+  <meson id="libsoup" mesonargs="-Dintrospection=disabled -Dgssapi=disabled -Dvapi=disabled">
     <if condition-set="macos">
       <mesonargs value="-Dtls_check=false"/>
     </if>
@@ -238,9 +238,9 @@
       <dep package="glib-networking"/>
       <dep package="libpsl"/>
     </dependencies>
-    <branch module="/pub/GNOME/sources/libsoup/2.67/libsoup-${version}.tar.xz" version="2.67.91"
+    <branch module="/pub/GNOME/sources/libsoup/2.68/libsoup-${version}.tar.xz" version="2.68.3"
             repo="ftp.gnome.org"
-            hash="sha256:390b5b28263d3bdf9866fa694346caa5e4bcb986e014e3383e9b6130b706f3da">
+            hash="sha256:534bb08e35b0ff3702f3adfde87d3441e27c12f9f5ec351f056fe04cba02bafb">
     </branch>
   </meson>
 

Modified: trunk/Tools/wpe/jhbuild.modules (253430 => 253431)


--- trunk/Tools/wpe/jhbuild.modules	2019-12-12 17:49:48 UTC (rev 253430)
+++ trunk/Tools/wpe/jhbuild.modules	2019-12-12 17:51:29 UTC (rev 253431)
@@ -95,14 +95,14 @@
             hash="sha256:f8fd0aeb66252dfcc638f14d9be1e2362fdaf2ca86bde0444ff4d5cc961b560f"/>
   </autotools>
 
-  <meson id="libsoup" mesonargs="-Dintrospection=false -Dgssapi=false -Dvapi=false">
+  <meson id="libsoup" mesonargs="-Dintrospection=disabled -Dgssapi=disabled -Dvapi=disabled">
     <dependencies>
       <dep package="glib-networking"/>
       <dep package="libpsl"/>
     </dependencies>
-    <branch module="/pub/GNOME/sources/libsoup/2.67/libsoup-${version}.tar.xz" version="2.67.91"
+    <branch module="/pub/GNOME/sources/libsoup/2.68/libsoup-${version}.tar.xz" version="2.68.3"
             repo="ftp.gnome.org"
-            hash="sha256:390b5b28263d3bdf9866fa694346caa5e4bcb986e014e3383e9b6130b706f3da">
+            hash="sha256:534bb08e35b0ff3702f3adfde87d3441e27c12f9f5ec351f056fe04cba02bafb">
     </branch>
   </meson>
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to