give options for curtailing downloads from cross-origin subframes |
||||||||
Issue descriptionSee 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.
,
Mar 20 2017
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)
,
Mar 20 2017
,
Mar 20 2017
,
Mar 20 2017
,
May 4 2017
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?
,
May 5 2017
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
,
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?
,
Mar 21 2018
,
Sep 10
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?
,
Sep 11
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by ojan@chromium.org
, Mar 20 2017