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

Issue 703223 link

Starred by 4 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocked on:
issue 539938



Sign in to add a comment

give options for curtailing downloads from cross-origin subframes

Project Member Reported by ojan@chromium.org, Mar 20 2017

Issue description

See related  issue 659492  and  issue 659489 . There's a few potential solutions:

1. Sandbox to disallow download completely in a frame. Blocked downloads silently fail. This is issue 539938. This seems like a no-brainer.

2. FeaturePolicy to disallow download completely in a frame. Blocked downloads silently fail.

3. FeaturePolicy to allow download in a frame. By default, show popup-blocking-esque dialog when a download is initiated in a cross-origin frame, unless the outer page has granted it permission to do so via FeaturePolicy. Will likely break legitimate content.

4. Require the frame to have had a user gesture before it can initiate downloads. If the download is blocked, show popup-blocking-esque dialog. Open question: Whether to allow a FeaturePolicy directive so the top-page can allow downloads without a gesture. 

2-4 conflict a bit in their use of FeaturePolicy. 4 is a more permissive version of 3 that's less likely to hit back-compat problems. I've been surprised at what people use cross-origin frames for as we limit their capabilities. I suspect there are legit cases of people downloading via cross-origin subframes that we'd break.

Regarding UI, the current popup blocking UI is way too intrusive on mobile. I think we'd need to rework the UI eventually. An alternative would be to do #4 without showing any UI when downloads are blocked, but I worry that will lead to users seeing broken sites.

 

Comment 1 by ojan@chromium.org, Mar 20 2017

See related https://github.com/WICG/feature-policy/issues/58#issuecomment-286919604 for discussion of the difficulty of using FeaturePolicy for #4. 
Curious -- what kind of content is completely broken by a dialog? Is there a real use case that mandates silent downloads from third-party sites, that can't handle a user confirmation? (esp. on mobile)

Cc: dtrainor@chromium.org jkarlin@chromium.org

Comment 4 by dahlke@google.com, Mar 20 2017

Cc: dah...@chromium.org

Comment 5 by bi...@google.com, Mar 20 2017

Cc: bi...@google.com
Labels: OS-All
Owner: qin...@chromium.org
Status: Assigned (was: Untriaged)
Assigning to Min to drive.  dahlke@ it looks like there are some UI concerns around this as well.  Min can you work with jkarlin@ and ojan@ to see what the status is and what we need to pick up?
as of 4 in #0, if user gesture is allowed,  attackers can easily trick users by putting some interesting icons/gifs to lure users to click on it, which sounds very unsafe

Comment 8 by bi...@google.com, Jan 31 2018

Hi Min, What's the status of this? Should we first collect some metrics to understand how frequent downloading happens with/without uses gesture? 
Jochen added some metrics for download in sandboxed iframe: https://chromium.googlesource.com/chromium/src.git/+/b8e3cbc5e907064231444ad6fb06bb5a1abac02b. I guess we can do something similar for download in x-domain iframe and in general?

Comment 9 by qin...@chromium.org, Mar 21 2018

Cc: aboss@chromium.org
Cc: yaoxia@chromium.org
Yao Xiao has been looking into adding a Feature Policy for downloads. Min, is this something you're actively working on? Would it be okay for Yao to take this bug?
Cc: -dah...@chromium.org -yaoxia@chromium.org qin...@chromium.org
Owner: yaoxia@chromium.org

Sign in to add a comment