Closed Bug 118993 Opened 23 years ago Closed 19 years ago

Use separate security checks for focusing frames/windows

Categories

(Core :: Security, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 300453
Future

People

(Reporter: bugzilla, Assigned: security-bugs)

Details

Attachments

(1 file)

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
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...
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 (!).
it was the pref setting. Sorry about that.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
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 → ---
Jesse, wouldn't your last comment just make this a duplicate of the "content controls should not stop script execution" bug?
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.
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
See also bug 196922, frame.focus() should not bring window to top.
Depends on: 196922
*** This bug has been marked as a duplicate of 300453 ***
Status: REOPENED → RESOLVED
Closed: 23 years ago19 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.

Attachment

General

Creator:
Created:
Updated:
Size: