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

Issue 2975623002: Fix: Loading cid: resources in WebView. (Closed)

Created:
3 years, 5 months ago by arthursonzogni
Modified:
3 years, 5 months ago
CC:
chromium-reviews, tyoshino+watch_chromium.org, loading-reviews_chromium.org, gavinp+loader_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, kinuko+watch, nasko
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix: Loading cid: resources in WebView. A bug has been introduced in: https://crrev.com/2834013002. The assumption that Content-ID URLs can't be loaded without an MHTMLArchive doesn't hold. It is possible for instance with the Yahoo Mail app. It embeds chrome as a Webview. The webview load attached image with the Content-ID scheme. This CL allows the load instead of blocking it. BUG=739658 TBR=japhet@chromium.org Review-Url: https://codereview.chromium.org/2975623002 Cr-Commit-Position: refs/heads/master@{#486796} Committed: https://chromium.googlesource.com/chromium/src/+/2cccbe128c2425ab5d68c74af8760fe6a7af72f4

Patch Set 1 #

Total comments: 4

Patch Set 2 : Nit (@clamy) #

Patch Set 3 : Add test. #

Patch Set 4 : Rebase. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -3 lines) Patch
M third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp View 1 2 3 1 chunk +8 lines, -3 lines 2 comments Download
M third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp View 1 2 3 1 chunk +34 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (25 generated)
arthursonzogni
Hi Nate and Camille, Could you please review this CL? I did something very simple ...
3 years, 5 months ago (2017-07-07 14:23:56 UTC) #3
clamy
Thanks! Lgtm. https://codereview.chromium.org/2975623002/diff/1/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2975623002/diff/1/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp#newcode649 third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp:649: // Please note that there is some ...
3 years, 5 months ago (2017-07-07 16:14:22 UTC) #4
arthursonzogni
Thanks Camille! https://codereview.chromium.org/2975623002/diff/1/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2975623002/diff/1/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp#newcode649 third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp:649: // Please note that there is some ...
3 years, 5 months ago (2017-07-10 09:03:32 UTC) #9
arthursonzogni
japhet@ gentle ping :-)
3 years, 5 months ago (2017-07-11 08:03:20 UTC) #10
Nate Chapin
I don't have access to https://crbug.com/739658, could I get cc:ed (or even better, make it ...
3 years, 5 months ago (2017-07-11 16:12:29 UTC) #11
Nate Chapin
On 2017/07/11 16:12:29, Nate Chapin wrote: > I don't have access to https://crbug.com/739658, could I ...
3 years, 5 months ago (2017-07-11 16:13:38 UTC) #12
arthursonzogni
Thanks! Test added. Does it looks good to you too?
3 years, 5 months ago (2017-07-12 09:05:04 UTC) #15
arthursonzogni
Hi Nate, Even if I have the LGTM, I will wait for you to review ...
3 years, 5 months ago (2017-07-13 13:33:09 UTC) #26
arthursonzogni
Hi yhirano@ Could you please take a look? Nate is OOO and I still need ...
3 years, 5 months ago (2017-07-13 22:08:11 UTC) #28
Torne
The test LGTM but I'm not a blink owner, so up to you whether you ...
3 years, 5 months ago (2017-07-14 13:55:47 UTC) #30
Torne
TBR'ing Nate - we need to land this urgently to cherrypick to M60 for stable, ...
3 years, 5 months ago (2017-07-14 15:31:23 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2975623002/120001
3 years, 5 months ago (2017-07-14 15:31:43 UTC) #35
commit-bot: I haz the power
Committed patchset #4 (id:120001) as https://chromium.googlesource.com/chromium/src/+/2cccbe128c2425ab5d68c74af8760fe6a7af72f4
3 years, 5 months ago (2017-07-14 17:36:36 UTC) #38
arthursonzogni
Thanks torne@! https://codereview.chromium.org/2975623002/diff/120001/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2975623002/diff/120001/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp#newcode650 third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp:650: // URLs for sub-resources, even without any ...
3 years, 5 months ago (2017-07-17 10:58:15 UTC) #39
Torne
3 years, 5 months ago (2017-07-17 14:58:39 UTC) #40
Message was sent while issue was closed.
On 2017/07/17 10:58:15, arthursonzogni wrote:
> Thanks torne@!
> 
>
https://codereview.chromium.org/2975623002/diff/120001/third_party/WebKit/Sou...
> File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
> (right):
> 
>
https://codereview.chromium.org/2975623002/diff/120001/third_party/WebKit/Sou...
> third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp:650: //
URLs
> for sub-resources, even without any MHTMLArchive. Please see
> On 2017/07/14 13:55:47, Torne wrote:
> > Just a note (don't expect you to change this CL for this, but maybe a
> followup):
> > while the specific broken cases we've seen in the wild are subresources, in
> > general WebView embedders can do anything they please with URLs and there's
no
> > reason to assume it's not also used for the main resource somewhere maybe.
How
> > important is it that this check exists at all?
> > 
> > The only URL usage we have actually forbidden in WebView is intercepting the
> > chrome:// scheme, because the security assumptions around this are too
deeply
> > embedded in chromium to work around.
> Thanks for this information.
> 
> Without this check, some weird pages caused the renderer to be killed.
> 
> What I will probably do in a follow up will be what I did in the first
patchset
> of https://codereview.chromium.org/2834013002/#ps140001
> (i.e. returning true in ShouldMakeNetworkRequestForURL(GURL("cid:xxxx")) and
> modify RenderFrameImpl::DecidePolicyForNavigation() appropriately).
> It will result in the removal of the part that block Content-ID URLs in the
> ResourceFetcher.
> I didn't do that right now in order to have a very simple CL that is easy to
> merge in M60.

Sure; that's fine, and I don't think it's that likely that any WebView apps
actually *do* use cid: URLs for the main frame, so there's no rush there; it
just seems better not to have the restriction if it's not needed, and your plan
sounds reasonable to me. Thanks for following up!

Powered by Google App Engine
This is Rietveld 408576698