location.href attempts to access chrome://browser/

RESOLVED DUPLICATE of bug 224502

Status

()

--
major
RESOLVED DUPLICATE of bug 224502
15 years ago
15 years ago

People

(Reporter: brandonthemandon, Assigned: bugzilla)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

15 years ago
User-Agent:       
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

A javascript location.href='somedir/somefile.html' or '/rootdir/somefile.html'
or 'somefile.html' produces the following errors: (copy and pasted with
addresses of internal web apps changed)
--
Security Error: Content at http://www.website.tld/dir1/dir2/ may not load or
link to chrome://browser/dir1/dir2/file.cfm.

Error: Access to 'chrome://browser/dir1/dir2/file.cfm' from script denied

Error: uncaught exception: [Exception... "Access to restricted URI denied" 
code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"  location: "<unknown>"]
--

Firefox appears to be interpreting the partial urls as referring to
chrome://brower instead of the current path in the url bar.  Firebird did not
have this problem.  Changing the links to
http://www.website.tld/dir1/dir2/file.cfm is a work around.


Reproducible: Always
Steps to Reproduce:
1.Create a web page with a form button with an onclick="location.href='file'
2.Click said button.

Actual Results:  
The three javascript errors mentioned in details.  No redirect was performed.

Expected Results:  
Performed a redirect to 'file'

Comment 1

15 years ago
This is a bug in TBE, not a bug in Firefox.

*** This bug has been marked as a duplicate of 224502 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.