Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Issue 2084333002: Correctly set 'firstPartyForCookies' in 'RenderFrameImpl::willSendRequest'. (Closed)

Created:
4 years, 6 months ago by Mike West
Modified:
4 years, 6 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, eae+blinkwatch, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Correctly set 'firstPartyForCookies' in 'RenderFrameImpl::willSendRequest'. Currently, we're grabbing the top-level frame's document, and using its 'firstPartyForCookies'. This is incorrect, as it doesn't walk the ancestor chain to verify same-siteness, and doubly incorrect as it punts entirely if the top-level frame is in a different process. alexmos@ fixed the underlying issue with the 'firstPartyForCookies' method in https://codereview.chromium.org/2046593003, so we no longer need this workaround. This patch does require a small change to 'firstPartyForCookies' to deal with imported documents, however; they don't have a frame, which the current code doesn't check for, which leads to null-derefs in every test that uses imports. This patch handles them by looking for their master document, and returning its value. R=jochen@chromium.org Committed: https://crrev.com/b1d1a95d912c54d4183f05feb6d377380552b1f3 Cr-Commit-Position: refs/heads/master@{#401280}

Patch Set 1 #

Patch Set 2 : tests #

Patch Set 3 : Missed one. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+243 lines, -10 lines) Patch
M content/browser/loader/resource_dispatcher_host_browsertest.cc View 1 2 chunks +223 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 1 chunk +3 lines, -10 lines 0 comments Download
M content/test/data/simple_links.html View 1 2 3 chunks +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 chunk +4 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 7 (3 generated)
jochen (gone - plz use gerrit)
lgtm
4 years, 6 months ago (2016-06-22 08:46:25 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2084333002/40001
4 years, 6 months ago (2016-06-22 13:45:22 UTC) #4
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 6 months ago (2016-06-22 14:58:21 UTC) #5
commit-bot: I haz the power
4 years, 6 months ago (2016-06-22 14:59:44 UTC) #7
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/b1d1a95d912c54d4183f05feb6d377380552b1f3
Cr-Commit-Position: refs/heads/master@{#401280}

Powered by Google App Engine
This is Rietveld 408576698