Canvas toDataURL failing same-origin policy for file: access

RESOLVED DUPLICATE of bug 444641

Status

()

Firefox
File Handling
RESOLVED DUPLICATE of bug 444641
9 years ago
9 years ago

People

(Reporter: Jeff Schiller, Unassigned)

Tracking

3.5 Branch
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

9 years ago
Created attachment 406699 [details]
Test case exhibiting the problem

https://developer.mozilla.org/En/Same-origin_policy_for_file:_URIs states that any two file: URLs are considered same origin "only if the parent directory of the originating file is an ancestor directory of the target file"

However, in my experience this is not working for Canvas's drawImage() and toDataURL().

If you download the attached two files and put them in the same directory, browsing to the HTML file yields FAIL

Browsing to them at http://codedread.com/browser-tests/draw-image.html yeilds PASS

Setting security.fileuri.strict_origin_policy to false yields PASS in the file: case, but this is not really acceptable for web apps like SVG-edit which I'd like to allow to run locally from the hard drive.
(Reporter)

Comment 1

9 years ago
Created attachment 406700 [details]
Image file needed with HTML for the test case
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 444641
You need to log in before you can comment on or make changes to this bug.