Problem/Motivation

By using the csp module and enabling sandbox directive, downloading of csf file generated by views_data_export doesn't work.
There is error in console:
Download is disallowed. The frame initiating or instantiating the download is sandboxed, but the flag ‘allow-downloads’ is not set. See https://www.chromestatus.com/feature/5706745674465280 for more details.

Steps to reproduce

Install and enable views_data_export. Create simple views with csv data export. Go to the view's page and click on csv icon. The page will be refreshed, but the csv file will not be downloaded.

Proposed resolution

Add additional options for the sandbox directive: allow-downloads, allow-downloads-without-user-activation.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 csp-sandbox-download-3269720-2.patch773 byteskhiminrm

Issue fork csp-3269720

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

khiminrm created an issue. See original summary.

khiminrm’s picture

khiminrm’s picture

Status: Active » Needs review

vacho made their first commit to this issue’s fork.

  • gapple committed 3894768 on 8.x-1.x
    Issue #3269720: Update sandbox directive options
    
gapple’s picture

I've updated the available options according to the HTML spec (https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-ifr...)

Though it is listed on MDN, I can't find any spec or implementation references for allow-downloads-without-user-activation

gapple’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.