Changeset 253431 in webkit


Ignore:
Timestamp:
Dec 12, 2019 9:51:29 AM (4 years ago)
Author:
Patrick Griffis
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:
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r253429 r253431  
     12019-12-12  Patrick Griffis  <pgriffis@igalia.com>
     2
     3        [SOUP] Use new API for strict secure cookies
     4        https://bugs.webkit.org/show_bug.cgi?id=169356
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Remove expected failures for secure cookie tests
     9
     10        * platform/gtk/TestExpectations:
     11        * platform/wpe/TestExpectations:
     12
    1132019-12-12  Truitt Savell  <tsavell@apple.com>
    214
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r253372 r253431  
    39793979webkit.org/b/204675 imported/w3c/web-platform-tests/offscreen-canvas/filter/offscreencanvas.filter.w.html [ Missing ]
    39803980
    3981 webkit.org/b/169356 imported/w3c/web-platform-tests/cookies/secure/set-from-dom.sub.html [ Failure ]
    3982 
    39833981#////////////////////////////////////////////////////////////////////////////////////////
    39843982# End of non-crashing, non-flaky tests failing
  • trunk/LayoutTests/platform/wpe/TestExpectations

    r253368 r253431  
    500500webkit.org/b/200165 imported/w3c/web-platform-tests/websockets/cookies/007.html [ Failure ]
    501501webkit.org/b/200165 imported/w3c/web-platform-tests/websockets/cookies/004.html [ Failure ]
    502 
    503 webkit.org/b/169356 imported/w3c/web-platform-tests/cookies/secure/set-from-dom.sub.html [ Failure ]
    504502
    505503#////////////////////////////////////////////////////////////////////////////////////////
  • trunk/Source/WebCore/ChangeLog

    r253430 r253431  
     12019-12-12  Patrick Griffis  <pgriffis@igalia.com>
     2
     3        [SOUP] Use new API for strict secure cookies
     4        https://bugs.webkit.org/show_bug.cgi?id=169356
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        The new soup API implements this spec:
     9
     10        https://tools.ietf.org/html/draft-ietf-httpbis-cookie-alone-01
     11
     12        * platform/network/soup/NetworkStorageSessionSoup.cpp:
     13        (WebCore::NetworkStorageSession::setCookiesFromDOM const):
     14        (WebCore::NetworkStorageSession::setCookies):
     15
    1162019-12-12  Don Olmstead  <don.olmstead@sony.com>
    217
  • trunk/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp

    r250589 r253431  
    292292            continue;
    293293
     294#if SOUP_CHECK_VERSION(2, 67, 1)
     295        soup_cookie_jar_add_cookie_full(jar, cookie.release(), origin.get(), firstPartyURI.get());
     296#else
    294297        soup_cookie_jar_add_cookie_with_first_party(jar, firstPartyURI.get(), cookie.release());
     298#endif
    295299    }
    296300
     
    298302}
    299303
    300 void NetworkStorageSession::setCookies(const Vector<Cookie>& cookies, const URL&, const URL&)
    301 {
    302     for (auto cookie : cookies)
     304void NetworkStorageSession::setCookies(const Vector<Cookie>& cookies, const URL& url, const URL& firstParty)
     305{
     306    for (auto cookie : cookies) {
     307#if SOUP_CHECK_VERSION(2, 67, 1)
     308        GUniquePtr<SoupURI> origin = urlToSoupURI(url);
     309        GUniquePtr<SoupURI> firstPartyURI = urlToSoupURI(firstParty);
     310
     311        soup_cookie_jar_add_cookie_full(cookieStorage(), cookie.toSoupCookie(), origin.get(), firstPartyURI.get());
     312#else
    303313        soup_cookie_jar_add_cookie(cookieStorage(), cookie.toSoupCookie());
     314#endif
     315    }
    304316}
    305317
  • trunk/Tools/ChangeLog

    r253410 r253431  
     12019-12-12  Patrick Griffis  <pgriffis@igalia.com>
     2
     3        [SOUP] Use new API for strict secure cookies
     4        https://bugs.webkit.org/show_bug.cgi?id=169356
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Update libsoup to fix a secure cookie test
     9
     10        * gtk/jhbuild.modules:
     11        * wpe/jhbuild.modules:
     12
    1132019-12-11  Jonathan Bedard  <jbedard@apple.com>
    214
  • trunk/Tools/gtk/jhbuild.modules

    r252860 r253431  
    231231  </autotools>
    232232
    233   <meson id="libsoup" mesonargs="-Dintrospection=false -Dgssapi=false -Dvapi=false">
     233  <meson id="libsoup" mesonargs="-Dintrospection=disabled -Dgssapi=disabled -Dvapi=disabled">
    234234    <if condition-set="macos">
    235235      <mesonargs value="-Dtls_check=false"/>
     
    239239      <dep package="libpsl"/>
    240240    </dependencies>
    241     <branch module="/pub/GNOME/sources/libsoup/2.67/libsoup-${version}.tar.xz" version="2.67.91"
    242             repo="ftp.gnome.org"
    243             hash="sha256:390b5b28263d3bdf9866fa694346caa5e4bcb986e014e3383e9b6130b706f3da">
     241    <branch module="/pub/GNOME/sources/libsoup/2.68/libsoup-${version}.tar.xz" version="2.68.3"
     242            repo="ftp.gnome.org"
     243            hash="sha256:534bb08e35b0ff3702f3adfde87d3441e27c12f9f5ec351f056fe04cba02bafb">
    244244    </branch>
    245245  </meson>
  • trunk/Tools/wpe/jhbuild.modules

    r252845 r253431  
    9696  </autotools>
    9797
    98   <meson id="libsoup" mesonargs="-Dintrospection=false -Dgssapi=false -Dvapi=false">
     98  <meson id="libsoup" mesonargs="-Dintrospection=disabled -Dgssapi=disabled -Dvapi=disabled">
    9999    <dependencies>
    100100      <dep package="glib-networking"/>
    101101      <dep package="libpsl"/>
    102102    </dependencies>
    103     <branch module="/pub/GNOME/sources/libsoup/2.67/libsoup-${version}.tar.xz" version="2.67.91"
    104             repo="ftp.gnome.org"
    105             hash="sha256:390b5b28263d3bdf9866fa694346caa5e4bcb986e014e3383e9b6130b706f3da">
     103    <branch module="/pub/GNOME/sources/libsoup/2.68/libsoup-${version}.tar.xz" version="2.68.3"
     104            repo="ftp.gnome.org"
     105            hash="sha256:534bb08e35b0ff3702f3adfde87d3441e27c12f9f5ec351f056fe04cba02bafb">
    106106    </branch>
    107107  </meson>
Note: See TracChangeset for help on using the changeset viewer.