Closed Bug 1404553 Opened 2 years ago Closed 2 years ago

Cannot view/download data-urls from <a> tags

Categories

(Core :: DOM: Security, defect)

57 Branch
defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 1403641
Tracking Status
firefox56 --- unaffected
firefox57 --- disabled
firefox58 --- fixed

People

(Reporter: nsdragon, Unassigned)

Details

(Keywords: regression, testcase)

Attachments

(1 file)

Attached file download.html
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20170929220356

Steps to reproduce:

If the href attribute of an <a> tag is a data-url, then clicking on that tag does nothing.

I'm attaching a sample file with two <a> tags; one where the data-url is embedded in the href attribute, and the other where the href attribute is dynamically generated with javascript.

In the file is also a button that creates a temporary <a> tag unattached to the page DOM, sets the href attribute dynamically (as above), and triggers a click event on it to attempt to download the data-url.

Finally, an <a> tag that simply links to a standalone external json file (not provided) which works as expected.

This is on Arch Linux 64-bit, Firefox Nightly 58.0a1 (20170929220356), reproducible on a brand new profile. My other browser is Chrome Beta 62.0.3202.38 and it behaves as expected.


Actual results:

Nothing happens at all. No navigation, no file save prompt, nothing.


Expected results:

Without the download attribute, it should have shown the JSON file view.

With it, it should've prompted the user to save the JSON data as "test.json".
Status: UNCONFIRMED → RESOLVED
Has STR: --- → yes
Closed: 2 years ago
Component: Untriaged → DOM: Security
Keywords: regression, testcase
Product: Firefox → Core
Resolution: --- → DUPLICATE
Duplicate of bug: 1403641
You need to log in before you can comment on or make changes to this bug.