Closed
Bug 118993
Opened 23 years ago
Closed 19 years ago
Use separate security checks for focusing frames/windows
Categories
(Core :: Security, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 300453
Future
People
(Reporter: bugzilla, Assigned: security-bugs)
Details
Attachments
(1 file)
456 bytes,
application/x-zip-compressed
|
Details |
I have a frameset ala:
<frame>
<framset src="t1.html" name="t1">
<framset src="t1.html" name="t2">
</frame>
Then in t1.html I do:
onclick=parent.t2.focus()
then I get:
Error: uncaught exception: Permission denied to call method Window.focus
t1 and t2 are on the same server...
why?
and why is it "uncaught" ?
build 20020108
Comment 1•23 years ago
|
||
It's uncaught because you did not catch it (using a try/catch). The weird thing
is that all.js has:
pref("capability.policy.default.Window.focus", "allAccess");
So this error should not be occurring...
Reporter | ||
Comment 2•23 years ago
|
||
Comment 3•23 years ago
|
||
Gemal, have you unchecked "Allow web pages to... raise or lower windows" in
advanced prefs? That might cause this error, since the function for focusing a
frame is the same as the function for focusing a window (!).
Reporter | ||
Comment 4•23 years ago
|
||
it was the pref setting. Sorry about that.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Comment 5•23 years ago
|
||
Setting a pref to prevent web pages from raising/lowering windows shouldn't
break scripts that just try to focus frames. Unfortunately, the function call
is the same for both.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Comment 6•23 years ago
|
||
Jesse, wouldn't your last comment just make this a duplicate of the "content
controls should not stop script execution" bug?
Comment 7•23 years ago
|
||
A call to focus() should succeed when it takes place within a framed document.
In that case, it shouldn't cause Mozilla to switch windows or tabs, regardless
of the security pref. Fixing bug 122866 would make this bug less of a problem
but wouldn't take care of it completely.
Assignee | ||
Comment 8•22 years ago
|
||
Changing description to "Use separate security checks for focusing frames/windows."
Summary: trying to set focus in other frame produces "Permission denied" → Use separate security checks for focusing frames/windows
Target Milestone: --- → Future
Comment 9•22 years ago
|
||
See also bug 196922, frame.focus() should not bring window to top.
Depends on: 196922
Comment 10•19 years ago
|
||
*** This bug has been marked as a duplicate of 300453 ***
Status: REOPENED → RESOLVED
Closed: 23 years ago → 19 years ago
No longer depends on: 196922
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•