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)

x86
Windows XP
defect
Not set
normal

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
Flags: blocking-firefox3?
Keywords: qawanted
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
Version: unspecified → Trunk
Component: File Handling → DOM
Flags: blocking-firefox3?
Product: Firefox → Core
QA Contact: file.handling → general
Bug 397791 comment 39 implies that this is WONTFIX.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.