Closed
Bug 417378
Opened 17 years ago
Closed 16 years ago
Access to restricted URI denied (NS_ERROR_DOM_BAD_URI) error when loading local XML file
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: carglue, Unassigned)
References
Details
(Keywords: qawanted)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3) Gecko/2008020514 Firefox/3.0b3 FireShot/0.32
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3) Gecko/2008020514 Firefox/3.0b3 FireShot/0.32
Starting with Firefox 3 beta3, loading a local XML file via trusted chrome fails with the following error: "Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)"
Our Firefox extension has an XPCOM-based JavaScript component that creates an XML document object, then loads it with the contents of a local XML file using a valid local file URL string.
Here's a stripped-down snippet of that part of the code:
var domParser = CC["@mozilla.org/xmlextras/domparser;1"].createInstance(CI.nsIDOMParser);
var domImpl = domParser.parseFromString("<?xml version='1.0' encoding='UTF-8' ?><dummy/>", "text/xml").implementation;
var docObj = domImpl.doctype;
var domTree = domImpl.createDocument("", "", null);
domTree.async = false;
domTree.load("file:///C:/d/y.xml");
The above code has been working fine for nearly 3 years, and also works fine in Firefox 3 beta2, as well as in all previous FF versions going back to at least 1.5.
Reproducible: Always
Comment 1•17 years ago
|
||
See bug 397791.
I have to ask: is there a reason not to just ParseFromStream on the file stream, or XMLHttpRequest, to start with? That would avoid creating the extra dummy document and so forth...
Blocks: 397791
Updated•17 years ago
|
Version: unspecified → Trunk
Updated•17 years ago
|
Component: File Handling → DOM
Flags: blocking-firefox3?
Product: Firefox → Core
QA Contact: file.handling → general
Comment 2•17 years ago
|
||
Bug 397791 comment 39 implies that this is WONTFIX.
Reporter | ||
Comment 3•17 years ago
|
||
Yes, the changes landed by bug 397791 do indeed appear to be the culprit, with these comments particularly relevant:
https://bugzilla.mozilla.org/show_bug.cgi?id=397791#c20
https://bugzilla.mozilla.org/show_bug.cgi?id=397791#c25
And I very much agree with:
https://bugzilla.mozilla.org/show_bug.cgi?id=397791#c37
https://bugzilla.mozilla.org/show_bug.cgi?id=397791#c38
Sigh.
Updated•16 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•