Foreign Fetch incorrectly intercepts same origin fetches made from service workers |
|||||
Issue descriptionThe "initiator" of a request is not getting set correctly for requests made from workers. The result of this is that the foreign fetch code doesn't detect requests made by it's own service worker as being same origin. This results in infinite loops if you try to fetch(event.request) in a foreign fetch handler.
,
Sep 12 2016
,
Sep 12 2016
Your change meets the bar and is auto-approved for M54 (branch: 2840)
,
Sep 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3fa4d0dbbd3f3839ec00a64e5c711bc0f3658416 commit 3fa4d0dbbd3f3839ec00a64e5c711bc0f3658416 Author: Joshua Bell <jsbell@chromium.org> Date: Mon Sep 12 17:16:38 2016 Correctly set requestor origin for worker initiated requests. ResourceRequest.requestTorOrigin() can never be null (since it is initialized to a unique origin rather than null). Because of that the check in FrameFetchContext::populateRequestData meant that this code would never actually set the requestor origin of a request. For requests from frames the code in RenderFrameImpl::willSendRequest would then replace the origin with the correct one anyway, but no such code exists for shared/service workers. BUG= 645281 , 625969 Review-Url: https://codereview.chromium.org/2323143002 Cr-Commit-Position: refs/heads/master@{#417712} (cherry picked from commit 65299f214fad8f609c5872bcdd5f4ea82ec29713) Review URL: https://codereview.chromium.org/2332023002 . Cr-Commit-Position: refs/branch-heads/2840@{#303} Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607} [modify] https://crrev.com/3fa4d0dbbd3f3839ec00a64e5c711bc0f3658416/third_party/WebKit/LayoutTests/http/tests/serviceworker/foreign-fetch-basics.html [modify] https://crrev.com/3fa4d0dbbd3f3839ec00a64e5c711bc0f3658416/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/foreign-fetch-worker.js [modify] https://crrev.com/3fa4d0dbbd3f3839ec00a64e5c711bc0f3658416/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp [modify] https://crrev.com/3fa4d0dbbd3f3839ec00a64e5c711bc0f3658416/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
,
Oct 27 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3fa4d0dbbd3f3839ec00a64e5c711bc0f3658416 commit 3fa4d0dbbd3f3839ec00a64e5c711bc0f3658416 Author: Joshua Bell <jsbell@chromium.org> Date: Mon Sep 12 17:16:38 2016 Correctly set requestor origin for worker initiated requests. ResourceRequest.requestTorOrigin() can never be null (since it is initialized to a unique origin rather than null). Because of that the check in FrameFetchContext::populateRequestData meant that this code would never actually set the requestor origin of a request. For requests from frames the code in RenderFrameImpl::willSendRequest would then replace the origin with the correct one anyway, but no such code exists for shared/service workers. BUG= 645281 , 625969 Review-Url: https://codereview.chromium.org/2323143002 Cr-Commit-Position: refs/heads/master@{#417712} (cherry picked from commit 65299f214fad8f609c5872bcdd5f4ea82ec29713) Review URL: https://codereview.chromium.org/2332023002 . Cr-Commit-Position: refs/branch-heads/2840@{#303} Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607} [modify] https://crrev.com/3fa4d0dbbd3f3839ec00a64e5c711bc0f3658416/third_party/WebKit/LayoutTests/http/tests/serviceworker/foreign-fetch-basics.html [modify] https://crrev.com/3fa4d0dbbd3f3839ec00a64e5c711bc0f3658416/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/foreign-fetch-worker.js [modify] https://crrev.com/3fa4d0dbbd3f3839ec00a64e5c711bc0f3658416/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp [modify] https://crrev.com/3fa4d0dbbd3f3839ec00a64e5c711bc0f3658416/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
,
Nov 11 2016
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by bugdroid1@chromium.org
, Sep 9 2016