Closed
Bug 72720
Opened 24 years ago
Closed 24 years ago
Error loading JavaScript functions from parent frame
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: faror, Assigned: neeti)
References
()
Details
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.4.1 i686; en-US; 0.8.1) Gecko/20010320
BuildID: 2001032008
Worked fine in Build 2001030321
Now clicking on link that uses JavaScript:parent.openNewWindow() generates:
JavaScript error:
line 0: uncaught exception: [Exception... "Access to property denied" code:
"1010" nsresult: "0x805303f2 (NS_ERROR_DOM_PROP_ACCESS_DENIED)" location:
"<unknown>"]
Reproducible: Always
Steps to Reproduce:
1.load http://home.pacbell.net/faror/test.html
2.attempt to click on either link in the frameset
Actual Results: No new window is opened
Expected Results: Results received from earlier builds; It opens a new window
Originally encoutered bug using MS Outlook web access which extensivly uses JS
from parent frames. The page referenced above is a simplified example of one of
the functions from MS Outlook web access.
Comment 1•24 years ago
|
||
Confirming with debug builds 2001-03-19 on WinNT, Linux. OS Linux --> All.
Browser, not engine. Because of the error NS_ERROR_DOM_PROP_ACCESS_DENIED,
reassigning to Security:General component for analysis -
I have builds from 2001-03-12 that work fine on this testcase, so that
narrows the regression a bit -
Assignee: rogerl → mstoltz
Status: UNCONFIRMED → NEW
Component: Javascript Engine → Security: General
Ever confirmed: true
OS: Linux → All
QA Contact: pschwartau → ckritzer
Comment 2•24 years ago
|
||
I can see some potential for problems if one of the frames loads a page from a
different domain, but not the same origin. Mitch, is this the sort of situation
where document.domain should be being used?
Comment 3•24 years ago
|
||
The problem is that the SchemeIs comparison at nsDocShell.cpp:3286 is returning
false when it should be returning true, because the scheme "JavaScript" is not
being changed internally to lowercase. The workaround is to use
"javascript:parent..." instead of "JavaScript:..." in your links. The solution
is to make sure the scheme name gets lowercased as expected. Reassigning to
Networking.
Assignee: mstoltz → neeti
Component: Security: General → Networking
QA Contact: ckritzer → tever
Comment 4•24 years ago
|
||
Here's the fix.
Index: src/nsSimpleURI.cpp
===================================================================
RCS file: /cvsroot/mozilla/netwerk/base/src/nsSimpleURI.cpp,v
retrieving revision 1.24
diff -u -r1.24 nsSimpleURI.cpp
--- nsSimpleURI.cpp 2001/03/13 02:00:53 1.24
+++ nsSimpleURI.cpp 2001/03/24 00:57:24
@@ -112,6 +112,7 @@
mScheme = scheme.ToNewCString();
if (mScheme == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
+ ToLowerCase(mScheme);
if (mPath)
nsCRT::free(mPath);
mPath = path.ToNewCString();
Comment 5•24 years ago
|
||
fix is in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•