Changeset 245441 in webkit
- Timestamp:
- May 17, 2019, 3:14:50 AM (7 years ago)
- Location:
- releases/WebKitGTK/webkit-2.24
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/tests/cookies/same-site/user-load-cross-site-redirect-expected.txt (added)
-
LayoutTests/http/tests/cookies/same-site/user-load-cross-site-redirect.php (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/loader/FrameLoader.cpp (modified) (2 diffs)
-
Source/WebCore/platform/network/ResourceRequestBase.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog
r245440 r245441 1 2019-02-21 Daniel Bates <dabates@apple.com> 2 3 Same Site Lax cookies are not sent with cross-site redirect from client-initiated load 4 https://bugs.webkit.org/show_bug.cgi?id=194906 5 <rdar://problem/44305947> 6 7 Reviewed by Brent Fulgham. 8 9 Add a test that is representative of a user loading a cross-site page that redirects 10 to a page that expects Same Site Lax cookies. 11 12 * http/tests/cookies/same-site/user-load-cross-site-redirect-expected.txt: Added. 13 * http/tests/cookies/same-site/user-load-cross-site-redirect.php: Added. 14 1 15 2019-04-03 Myles C. Maxfield <mmaxfield@apple.com> 2 16 -
releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog
r245440 r245441 1 2019-02-21 Daniel Bates <dabates@apple.com> 2 3 Same Site Lax cookies are not sent with cross-site redirect from client-initiated load 4 https://bugs.webkit.org/show_bug.cgi?id=194906 5 <rdar://problem/44305947> 6 7 Reviewed by Brent Fulgham. 8 9 Ensure that a request for a top-level navigation is annotated as such regardless of whether 10 the request has a computed Same Site policy. 11 12 "New loads" initiated by a the client (Safari) either by API or a human either explicitly 13 typing a URL in the address bar or Command + clicking a hyperlink to open it in a new window/tab 14 are always considered Same Site. This is by definition from the spec. [1] as we aren't navigating 15 from an existing page. (Command + click should be thought of as a convenience to the user from 16 having to copy the hyperlink's URL, create a new window, and paste the URL into the address bar). 17 Currently the frame loader marks a request as a top-level navigation if and only if the request 18 does not have a pre-computed Same Site policy. However, "New loads" have a pre-computed Same Site 19 policy. So, these loads would never be marked as a top-level navigation by the frame loading code. 20 Therefore, if the "new load" turned out to be a cross-site redirect then WebKit would incorrectly 21 tell the networking stack that the load was a cross-site, non-top-level navigation, and per the 22 Same Site spec [2], the networking stack would not send Same Site Lax cookies. Instead, 23 WebKit should unconditionally ensure that requests are marked as a top-level navigation, if applicable. 24 25 [1] See Note for (1) in <https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-02#section-5.2> 26 [2] <https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-02#section-5.3.7.1> 27 28 Test: http/tests/cookies/same-site/user-load-cross-site-redirect.php 29 30 * loader/FrameLoader.cpp: 31 (WebCore::FrameLoader::addExtraFieldsToRequest): Unconditionally update the request's top- 32 level navigation bit. 33 * platform/network/ResourceRequestBase.cpp: 34 (WebCore::ResourceRequestBase::setAsIsolatedCopy): Unconditionally copy a request's top- 35 level navigation bit. 36 1 37 2019-04-03 Myles C. Maxfield <mmaxfield@apple.com> 2 38 -
releases/WebKitGTK/webkit-2.24/Source/WebCore/loader/FrameLoader.cpp
r241808 r245441 2868 2868 // Don't set the cookie policy URL if it's already been set. 2869 2869 // But make sure to set it on all requests regardless of protocol, as it has significance beyond the cookie policy (<rdar://problem/6616664>). 2870 bool isMainFrameMainResource = isMainResource && m_frame.isMainFrame(); 2870 2871 if (request.firstPartyForCookies().isEmpty()) { 2871 if (isMain Resource && m_frame.isMainFrame())2872 if (isMainFrameMainResource) 2872 2873 request.setFirstPartyForCookies(request.url()); 2873 2874 else if (Document* document = m_frame.document()) … … 2886 2887 } 2887 2888 addSameSiteInfoToRequestIfNeeded(request, initiator); 2888 request.setIsTopSite(isMainResource && m_frame.isMainFrame());2889 }2889 } 2890 request.setIsTopSite(isMainFrameMainResource); 2890 2891 2891 2892 Page* page = frame().page(); -
releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/network/ResourceRequestBase.cpp
r238771 r245441 71 71 setInspectorInitiatorNodeIdentifier(*inspectorInitiatorNodeIdentifier); 72 72 73 if (!other.isSameSiteUnspecified()) {73 if (!other.isSameSiteUnspecified()) 74 74 setIsSameSite(other.isSameSite()); 75 setIsTopSite(other.isTopSite()); 76 } 75 setIsTopSite(other.isTopSite()); 77 76 78 77 updateResourceRequest();
Note:
See TracChangeset
for help on using the changeset viewer.