Closed Bug 1906650 Opened 1 year ago Closed 1 year ago

Chapter 1: implement Trusted Types support for `Element.insertAdjacentHTML` without default-policy support without reporting violations

Categories

(Core :: DOM: Security, task)

task

Tracking

()

RESOLVED FIXED

People

(Reporter: mbrodesser, Assigned: mbrodesser)

References

(Blocks 1 open bug)

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file, 2 obsolete files)

Assignee: nobody → mbrodesser
Whiteboard: [domsecurity-active]

Union types in WebIDL for variadic arguments require this
(https://firefox-source-docs.mozilla.org/dom/webIdlBindings/index.html#union-types).

If this results in an efficiency problem, one might try to change union
types to allow non-reference-counted members. For now, this was agreed
with peterv.

To be used in a following part.

If nsCSPDirective::AreTrustedTypesForSinkGroupRequired turns out to be
to ineffcient, release builds could simply return mDirective == REQUIRE_TRUSTED_TYPES_FOR_DIRECTIVE since there's currently only one
sink group ("script"). nsCSPParser adds the directive for
REQUIRE_TRUSTED_TYPES_FOR_DIRECTIVE only if that sink group is parsed
too.

Depends on D216169

Attachment #9412042 - Attachment description: WIP: Bug 1906650: part 2) Start adding `TrustedHTML` to `Element.insertAdjacentHTML` → WIP: Bug 1906650: part 3) Start adding `TrustedHTML` to `Element.insertAdjacentHTML`
Attachment #9412041 - Attachment description: WIP: Bug 1906650: part 1) Make `TrustedHTML` and analogous classes reference-counted → WIP: Bug 1906650: part 1) Make `TrustedHTML` and analogous classes cycle-collected
Summary: Implement Trusted Types support for `Element.insertAdjacentHTML` → Implement Trusted Types support for `Element.insertAdjacentHTML` without default-policy support
Summary: Implement Trusted Types support for `Element.insertAdjacentHTML` without default-policy support → Implement Trusted Types support for `Element.insertAdjacentHTML` without default-policy support without reporting violations
Attachment #9412041 - Attachment description: WIP: Bug 1906650: part 1) Make `TrustedHTML` and analogous classes cycle-collected → Bug 1906650: part 1) Make `TrustedHTML` and analogous classes cycle-collected. r=peterv
Attachment #9412281 - Attachment description: WIP: Bug 1906650: part 2) Add `nsCSPPolicy::AreTrustedTypesForSinkGroupRequired` → Bug 1906650: part 2) Add `nsCSPPolicy::AreTrustedTypesForSinkGroupRequired`. r=tschuster
Attachment #9412042 - Attachment description: WIP: Bug 1906650: part 3) Start adding `TrustedHTML` to `Element.insertAdjacentHTML` → Bug 1906650: part 3) Add `TrustedHTML` to `Element.insertAdjacentHTML`. r=smaug,peterv
Pushed by mbrodesser@igalia.com: https://hg.mozilla.org/integration/autoland/rev/a63bba70fa30 part 1) Make `TrustedHTML` and analogous classes cycle-collected. r=peterv

It would be nice to not land individual patches from a bug. There is a risk that one patch ends up to one release and some other patch to another and if there are then issues with the patch, backing out stuff gets a bit messy.

(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #6)

It would be nice to not land individual patches from a bug. There is a risk that one patch ends up to one release and some other patch to another and if there are then issues with the patch, backing out stuff gets a bit messy.

Agreed. The disadvantage of keeping patches unlanded is that they may bit-rot. I'll try to respect the soft-code-freezes (https://whattrainisitnow.com/calendar/) and move the remaining patches to a separate ticket if the affected releases differ.

(In reply to Mirko Brodesser (:mbrodesser-Igalia) from comment #7)

(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #6)

It would be nice to not land individual patches from a bug. There is a risk that one patch ends up to one release and some other patch to another and if there are then issues with the patch, backing out stuff gets a bit messy.

Agreed. The disadvantage of keeping patches unlanded is that they may bit-rot. I'll try to respect the soft-code-freezes (https://whattrainisitnow.com/calendar/) and move the remaining patches to a separate ticket if the affected releases differ.

Filed https://bugzilla.mozilla.org/show_bug.cgi?id=1909878 for Lando to check that.

Summary: Implement Trusted Types support for `Element.insertAdjacentHTML` without default-policy support without reporting violations → Chapter 1: implement Trusted Types support for `Element.insertAdjacentHTML` without default-policy support without reporting violations

Comment on attachment 9412281 [details]
Bug 1906650: part 2) Add nsCSPPolicy::AreTrustedTypesForSinkGroupRequired. r=tschuster

Revision D216304 was moved to bug 1913077. Setting attachment 9412281 [details] to obsolete.

Attachment #9412281 - Attachment is obsolete: true

Comment on attachment 9412042 [details]
Bug 1906650: part 3) Add TrustedHTML to Element.insertAdjacentHTML. r=smaug,peterv

Revision D216170 was moved to bug 1913077. Setting attachment 9412042 [details] to obsolete.

Attachment #9412042 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 1 year ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: