Trusted Types policies should not apply to isolated WebExtension content scripts
Categories
(Core :: DOM: Security, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox140 | --- | fixed |
People
(Reporter: tschuster, Assigned: tschuster)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Attachments
(3 files)
We make some effort to exempt extensions from page CSPs (bug 1267027), we should consider doing the same for Trusted Types, otherwise pages could unduly restrict the functionality of extensions.
Assignee | ||
Comment 1•4 months ago
|
||
I verified that currently Trusted Types can prevent WebExtension content scripts from using innerHTML and other sinks to inject content into the page. This applies to both ISOLATED and MAIN world content scripts.
I have a patch that would allow us to bypass Trusted Types completely for isolated content scripts by checking the nsIPrincipal when e.g. calling the innerHTML setter. (We could use the same mechanism for UA widgets, which would be an alternative to the changes in bug 1961770)
I think for main world content scripts we can't do anything, because they just look/behave like normal scripts inside the page.
Assignee | ||
Comment 2•4 months ago
|
||
Updated•4 months ago
|
Assignee | ||
Comment 4•4 months ago
|
||
Assignee | ||
Updated•4 months ago
|
Assignee | ||
Comment 5•4 months ago
|
||
Assignee | ||
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Assignee | ||
Updated•4 months ago
|
![]() |
||
Comment 7•4 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/627d49221806
https://hg.mozilla.org/mozilla-central/rev/b4723229d8d0
https://hg.mozilla.org/mozilla-central/rev/3566d94bcda7
Updated•3 months ago
|
Description
•