Closed Bug 428409 Opened 15 years ago Closed 15 years ago

Permission denied when running XMLHttpRequest.open in file:-protocol

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 425201

People

(Reporter: i.love.spam, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5

The following code raises an error when run locally (file: protocol).

new XMLHttpRequest().open('GET', 'anyfile');

I do not think this was the case in FF3b4. The error I get in Firebug (German
"Die Erlaubnis für den Aufruf der Methode XMLHttpRequest.open wurde verweigert"
This should translate to:
"Permission denied to call mathod XMLHttpRequest.open"



Reproducible: Always

Steps to Reproduce:
1. run
new XMLHttpRequest().open('GET' /*anything*/, 'anyfile' /*at least one char*/);
locally.
Actual Results:  
error

Expected Results:  
no error
Component: Search → DOM: Mozilla Extensions
Product: Firefox → Core
QA Contact: search → general
Version: unspecified → Trunk
You can not link from remote (http://) to local files.
You can only access local files in the same directory if you want to open a local file form a document also loaded via file://.

Actually, that is exactly what I meant. The document is run locally, the adress bar shows the file:// protocol, but I can not access anything within the same directory oder in sub-directories via xhr.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
As described in comment 2 it should work (source a local file:, XHR target a local file in the same or sub directory). This is a duplicate of bug 425201 and has been fixed in nightly test builds for a couple of weeks.

Component: DOM: Mozilla Extensions → DOM
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.