Closed Bug 1655714 Opened 6 months ago Closed 6 months ago

Inappropriate use of nsContentPolicyType::TYPE_OTHER in nsMessageManagerScriptExecutor::TryCacheLoadAndCompileScript( )

Categories

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

task

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: freddy, Assigned: freddy)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The file at https://searchfox.org/mozilla-central/source/dom/base/nsFrameMessageManager.cpp#1209 is using TYPE_OTHER for loading scripts.

To ensure that all existing security checks are monitoring the right kind of loads, it seems more appropriate to use TYPE_SCRIPT.

For more information, see the blocking meta bug 1651987

Severity: -- → S3
Assignee: nobody → fbraun
Status: NEW → ASSIGNED

This is all green on try.
@ckerschb: kmag wondered if we should add a new type. Dunno if they are cheap / for free. We can land as-is or add a new nsicontentpolicytype. Do you have a preference?

Flags: needinfo?(ckerschb)

(In reply to Frederik Braun [:freddy] from comment #3)

This is all green on try.
@ckerschb: kmag wondered if we should add a new type. Dunno if they are cheap / for free. We can land as-is or add a new nsicontentpolicytype. Do you have a preference?

Replied on Phab: https://phabricator.services.mozilla.com/D85977#2682456

Flags: needinfo?(ckerschb)
Attachment #9168084 - Attachment description: Bug 1655714 - Use TYPE_SCRIPT in TryCacheLoadAndCompileScript(), r?kmag → Bug 1655714 - Use TYPE_INTERNAL_FRAME_MESSAGEMANAGER_SCRIPT in TryCacheLoadAndCompileScript(), r?kmag
Attachment #9168084 - Attachment description: Bug 1655714 - Use TYPE_INTERNAL_FRAME_MESSAGEMANAGER_SCRIPT in TryCacheLoadAndCompileScript(), r?kmag → Bug 1655714 - Add TYPE_INTERNAL_FRAME_MESSAGEMANAGER_SCRIPT and use in TryCacheLoadAndCompileScript(), r?kmag
Pushed by fbraun@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/12683a4cbe49
Add TYPE_INTERNAL_FRAME_MESSAGEMANAGER_SCRIPT and use in TryCacheLoadAndCompileScript(), r=kmag
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.