Closed
Bug 357841
Opened 19 years ago
Closed 14 years ago
NS_ERROR_DOM_SECURITY_ERR thrown when using a javascript anchor
Categories
(Firefox :: Security, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: gugurete, Unassigned)
References
()
Details
(Whiteboard: [testday-20120615])
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
The following HTML throws NS_ERROR_DOM_SECURITY_ERR when the page is deployed
on a web server (apache).
Exact error message as displayed in the error console:
Error: uncaught exception: [Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "<unknown>"]
When tried on the local file system it works.
When the javascript function is defined in the HTML file and not included
as in the html snippet below, it also works.
<HTML>
<HEAD>
<SCRIPT SRC="../../Resources/ValamitScript.js" DEFER> </SCRIPT>
<HEAD>
<BODY>
<A href="javascript:show()"> <IMG src="042p.jpg"></A>
<BODY>
</HTML>
Javascript function "show()" is defined in "../../Resources/ValamitScript.js"
Reproducible: Always
Steps to Reproduce:
1. Deploy the following html on a web server:
<HTML>
<HEAD>
<SCRIPT SRC="../../Resources/ValamitScript.js" DEFER> </SCRIPT>
<HEAD>
<BODY>
<A href="javascript:show()"> <IMG src="animage.jpg"></A>
<BODY>
</HTML>
2. Deploy the a javascript file under ../../ValamitScript.js wich contains a function named "show()"
3. Open the html file with firefox 2.0.
4. Click on the anchor tag.
5. You should get the following error :
Error: uncaught exception: [Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "<unknown>"]
Actual Results:
The function "show" is not being called. The error console displays the folowing:
Error: uncaught exception: [Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "<unknown>"]
Expected Results:
the javascript function should be called
Comment 1•19 years ago
|
||
The above link works for me in both FF1.5 and FF2 (nice pics!). I have no way of knowing if you've changed the remote code or not.
Have any extensions installed, or customized pref settings?
| Reporter | ||
Comment 2•19 years ago
|
||
Thanks, quite a fast answer !!
You are completely right, the above link works fine when accesed directly
http://wp1056917.wp029.webpack.hosteurope.de/2006/BestOf/INDEX.HTM
(that is something new to myself as well :-)
The thing is that this link is normally accesed from a domain forwarder
1. Go to www.valamit.com
2. click on the "Best Of 2006"
3. you should get to the exact same page as mentined before (wp1056917.wp029.webpack.hosteurope.de/2006/BestOf/INDEX.HTM)
4. try clicking any of the images on the page.
5. nothing will happen and the error console will display a NS_ERROR_DOM_SECURITY_ERR
Comment 3•19 years ago
|
||
The exception happens when calling document.open() inside a frame which has a different origin than the document containing the frame.
In this case, the document domain of the containing the frame is www.valamit.com and the inside frame has domain wp1056917.wp029.webpack.hosteurope.de.
This error also occurs with Firefox 3.6.8 when trying to download drivers from the ATI Drivers site
http://support.amd.com/us/gpudownload/Pages/index.aspx
According to ATI - the recommendation is to use Internet Explorer as Firefox does not work!
Error: uncaught exception: [Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "http://www.amd.com/us/as/scode_support.js Line: 382"]
Error: too much recursion
Source File: http://support.amd.com/_layouts/1033/init.js?rev=yOq8IoAABYCtaZjMVrjxtg%3D%3D
Line: 565
Updated•15 years ago
|
Version: unspecified → 3.6 Branch
Comment 6•14 years ago
|
||
Firefox 3.6 is now EOL, please try latest version of Firefox and feel free to open if it reproducible on latest build
* http://getfirefox.com
for support
* https://support.mozilla.org/ask
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
Whiteboard: [testday-20120615]
You need to log in
before you can comment on or make changes to this bug.
Description
•