New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 717971 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Out until 24 Jan
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug


Show other hotlists

Hotlists containing this issue:
plz-navigate-blockers


Sign in to add a comment

PlzNavigate: make sure we don't execute XFO checks on downloads

Project Member Reported by clamy@chromium.org, May 3 2017

Issue description

https://codereview.chromium.org/2847443002 landed which enables proper pausing of the load in the IO stack when the navigation is a download in PlzNavigate. In particular, this means that downloads will now get cancelled by NavigationThrottles.

We should check whether some of the NavigationThrottles should skip checks when the navigation is a download. Examples are AncestorNavigationThrottle and MixedContentThrottle.

@mkwst: is that right that they should not execute?
 

Comment 1 by nasko@chromium.org, May 4 2017

Is this blocking shipping of PlzNavigate or can it be investigated in parallel?

Comment 2 by clamy@chromium.org, May 5 2017

This caused the initial XFO patch to be reverted since it blocked some downloads, so this is blocking IMO.

Comment 3 Deleted

@mkwst: Maybe  http://crbug.com/710748  is related?
I don't know what is the correct behavior. I am interested in your answer to @clamy's question in #1.

The bugfix would probably be as simple as adding an
if ("navigation_handle_impl->is_download_") { "ignore" }
in the AncestorThrottle:WillProcessResponse()

Comment 5 by nasko@chromium.org, May 9 2017

Cc: arthurso...@chromium.org
Owner: ----

Comment 6 by mkwst@chromium.org, May 10 2017

I agree with clamy@; we ought to ignore XFO for downloads. That's the behavior Chrome's had for a long time, and matches Firefox, Safari, and Edge.
Owner: arthurso...@chromium.org
Status: Assigned (was: Untriaged)
Okay, thanks mkwst@. I will work on this.

Comment 8 by nasko@chromium.org, May 10 2017

Owner: nasko@chromium.org
Status: Started (was: Assigned)
Thanks Arthur for volunteering, but I had some time and put a CL together to save you some cycles to work on other bugs. https://codereview.chromium.org/2874933002
Just wondering, should AncestorThrottle similarly ignore CSP frame-src for downloads?  Looks like the renderer-side frame-src check in MaybeCheckCSP only applies if policy == kNavigationPolicyCurrentTab, so seems like it'd get skipped for kNavigationPolicyDownload.
Cc: alex...@chromium.org

Comment 12 by nasko@chromium.org, May 11 2017

Status: Fixed (was: Started)
Comment 9: For frame-ancestors, which is the equivalent of XFO in CSP, we enforce it in the renderer process, so it should behave identically with or without PlzNavigate. 

For frame-src and form-action, I believe they are different in intent. As a site operator, if I say frame-src: 'foo.com', I'm telling the browser to allow only going to foo.com. If we make downloads exempt from this, it allows the attacker to download files from arbitrary origins to the user's machine even when the site CSP say never go outside of my own domain.

As such, I'm closing this bug a s fixed, but if you feel my reasoning is incorrect, feel free to reopen with more details.

Sign in to add a comment