Closed Bug 1179334 Opened 10 years ago Closed 10 years ago

various nsDOMWindowUtils methods are missing IsCallerChrome() checks

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(1 file)

Just looks like we've forgotten checks on some more-or-less recently added methods. Since bug 775868 for initially adding these checks was a sec bug, filing this one as such as well, even if our wrapper safety has improved since then.
Group: dom-core-security
Attached them to everything that was NS_IMETHODIMP. We should just have a little static analysis for this sort of thing...
Attachment #8629041 - Flags: review?(continuation)
Comment on attachment 8629041 [details] [diff] [review] check for chrome callers in nsDOMWindowUtils interface methods Review of attachment 8629041 [details] [diff] [review]: ----------------------------------------------------------------- Thanks! ::: dom/base/nsDOMWindowUtils.cpp @@ +3656,5 @@ > > NS_IMETHODIMP > HandlingUserInputHelper::Destruct() > { > + MOZ_RELEASE_ASSERT(nsContentUtils::IsCallerChrome()); This isn't a method on nsDOMWindowUtils. Does it really need the check?
Attachment #8629041 - Flags: review?(continuation) → review+
Bobby, are these checks still important? Should this just be sec-moderate or unhidden or something?
Flags: needinfo?(bobbyholley)
I don't think we need them anymore after bug 1017820. Ehsan added the release-mode asserts in bug 1018482. Could be useful defense-in-depth to have those assertions, but this isn't security-sensitive AFAICT.
Flags: needinfo?(bobbyholley)
Group: dom-core-security
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: