Closed
Bug 670317
Opened 13 years ago
Closed 13 years ago
"ASSERTION: JS failed without setting an exception!" with setTimeout
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: jruderman, Assigned: enndeakin)
Details
(Keywords: assertion, sec-moderate, testcase, Whiteboard: [qa!][advisory-tracking+])
Attachments
(3 files)
JavaScript error: , line 0: Permission denied for <file://> to call method XULElement.QueryInterface
###!!! ASSERTION: JS failed without setting an exception!: 'JS_IsExceptionPending(cx)', file js/src/xpconnect/src/xpcwrappedjsclass.cpp, line 323
Security-sensitive because there seems to be some context or privilege confusion. Did a the file: URL really get its hands on a XULElement?
Reporter | ||
Comment 1•13 years ago
|
||
Comment 2•13 years ago
|
||
We end up with that JS error because nsHTMLLegendElement::Focus calls nsFocusManager::MoveFocus which calls nsFocusManager::DetermineElementToMoveFocus which tries to get the next tabbable content, which ends up calling nsXULElement::IsFocusable on a <xul:textbox>. This is presumably happening because MoveFocus is used by the legend element to move focus to the next thing in tab order, but there's nothing else in the content document in tab order, so we end up trying to move the focus to chrome. This is probably buggy; enn, is there a way to restrict the focus move to the content document?
That said, it's odd that trying to call back out through XPConnect there does a security check...
Assignee | ||
Comment 3•13 years ago
|
||
Should be fairly easy to add. Just implement an extra bitflag passed to MoveFocus. Then when set, DetermineElementToMoveFocus would need to return early here:
http://mxr.mozilla.org/mozilla-central/source/dom/base/nsFocusManager.cpp#2517
(before where it says 'Traverse up to the parent document')
I assume you still want to traverse down into subframes, but this will stop traversal up and to siblings.
Comment 4•13 years ago
|
||
There is in fact a security check: does that save us enough or do you think there's still a potential security problem here.
Neil: would such a check interfere with tabbing around a multi-frame document, or just automatic focus moves as in this legend case?
Updated•13 years ago
|
Assignee: nobody → enndeakin
Whiteboard: [need answer to comment from 4 neil]
Assignee | ||
Comment 5•13 years ago
|
||
The intent would be that the flag would only be supplied by the call from nsHTMLLegendElement::Focus.
Updated•13 years ago
|
Whiteboard: [need answer to comment from 4 neil] → [sg:moderate][need answer to comment from 4 neil]
Assignee | ||
Comment 7•13 years ago
|
||
Whiteboard: [sg:moderate][need answer to comment from 4 neil] → [sg:moderate]
Assignee | ||
Comment 9•13 years ago
|
||
Comment on attachment 591169 [details] [diff] [review]
Add flag for legend focus
Can do, I was waiting to ensure that tests passed which they do.
Attachment #591169 -
Flags: review?(bugs)
Comment 10•13 years ago
|
||
Comment on attachment 591169 [details] [diff] [review]
Add flag for legend focus
I guess this is ok.
Attachment #591169 -
Flags: review?(bugs) → review+
Updated•13 years ago
|
Attachment #591169 -
Flags: checkin?
Assignee | ||
Comment 11•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Comment 12•13 years ago
|
||
We should be able to do without fixing this on the ESR because the existing security check does prevent bad things happening.
status-firefox-esr10:
--- → wontfix
status-firefox11:
--- → wontfix
status-firefox12:
--- → affected
status-firefox13:
--- → fixed
Updated•13 years ago
|
Whiteboard: [sg:moderate][qa+] → [sg:moderate][qa+][advisory-tracking+]
Updated•12 years ago
|
Status: RESOLVED → VERIFIED
Whiteboard: [sg:moderate][qa+][advisory-tracking+] → [sg:moderate][qa!][advisory-tracking+]
Updated•12 years ago
|
Attachment #591169 -
Flags: checkin?
Updated•12 years ago
|
Group: core-security
Keywords: sec-moderate
Whiteboard: [sg:moderate][qa!][advisory-tracking+] → [qa!][advisory-tracking+]
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•