Closed Bug 2070313 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 62484 - Sanitizer: Assert that different calls don't modify the baseline configuration or each other

Categories

(Core :: DOM: Security, task, P4)

task

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 62484 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/62484
Details from upstream follow.

Noam Rosenthal <nrosenthal@google.com> wrote:

Sanitizer: Assert that different calls don't modify the baseline configuration or each other

Component: web-platform-tests → DOM: Security
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 31 tests and 8 subtests

Status Summary

Firefox

OK : 1[GitHub] 31[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 16[GitHub] 662[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 3[GitHub] 183[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
PASS: 19

Safari

OK : 1
PASS: 1
FAIL: 18

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /sanitizer-api/parsehtmlunsafe-with-trustedtypes.tentative.html [wpt.fyi]
    • Document.parseHTMLUnsafe: createParserOptions can inject a sanitizer config: FAIL
    • Document.parseHTMLUnsafe: passing TrustedParserOptions directly works: FAIL
    • Document.parseHTMLUnsafe: createParserOptions returning 0 fails: FAIL
    • Document.parseHTMLUnsafe: createParserOptions returning 123 fails: FAIL
    • Document.parseHTMLUnsafe: createParserOptions returning "foo" fails: FAIL
  • /sanitizer-api/sanitizer-base-immutable.html [wpt.fyi]
    • Modifying a Sanitizer instance does not change subsequent new Sanitizer() instances: FAIL [GitHub], PASS [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] (Chrome: PASS, Safari: FAIL)
    • allowProcessingInstruction() on new Sanitizer() does not affect subsequent instances: FAIL [GitHub], PASS [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] (Chrome: PASS, Safari: FAIL)
    • removeProcessingInstruction() on new Sanitizer() does not affect subsequent instances: FAIL [GitHub], PASS [Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] (Chrome: PASS, Safari: FAIL)
  • /sanitizer-api/sanitizer-basic-filtering.html [wpt.fyi]
    • setHTML testcase comments/1, "a <!-- comment --> b": FAIL
    • setHTMLUnsafe testcase comments/1, "a <!-- comment --> b": FAIL
    • ShadowRoot.setHTML testcase comments/1, "a <!-- comment --> b": FAIL
    • ShadowRoot.setHTMLUnsafe testcase comments/1, "a <!-- comment --> b": FAIL
    • parseHTML testcase comments/1, "a <!-- comment --> b": FAIL
    • parseHTMLUnsafe testcase comments/1, "a <!-- comment --> b": FAIL
  • /sanitizer-api/sanitizer-in-adoption-agency.html [wpt.fyi]
    • Testcase #5, "<b>1<p>foo</b>bar", config: "{ "replaceWithChildrenElements": ["b"] }".: FAIL
    • Testcase #6, "<b><div>Text</b>", config: "{ "replaceWithChildrenElements": ["div"] }".: FAIL
  • /sanitizer-api/sanitizer-parseHTML.html [wpt.fyi]
    • parseHTML testcase 3, "<div>a<!-- xx -->b": FAIL
  • /sanitizer-api/sanitizer-processing-instructions.html [wpt.fyi]
    • setHTMLUnsafe testcase agnostic/0, "<?target data?>": FAIL
    • ShadowRoot.setHTMLUnsafe testcase agnostic/0, "<?target data?>": FAIL
    • setHTML testcase agnostic/0, "<?target data?>": FAIL
    • ShadowRoot.setHTML testcase agnostic/0, "<?target data?>": FAIL
    • parseHTML testcase agnostic/0, "<?target data?>": FAIL
    • parseHTMLUnsafe testcase agnostic/0, "<?target data?>": FAIL
    • setHTMLUnsafe testcase agnostic/1, "<?target data?>": FAIL
    • ShadowRoot.setHTMLUnsafe testcase agnostic/1, "<?target data?>": FAIL
    • setHTML testcase agnostic/1, "<?target data?>": FAIL
    • ShadowRoot.setHTML testcase agnostic/1, "<?target data?>": FAIL
    • parseHTML testcase agnostic/1, "<?target data?>": FAIL
    • parseHTMLUnsafe testcase agnostic/1, "<?target data?>": FAIL
    • setHTMLUnsafe testcase agnostic/2, "<?Target data?>": FAIL
    • ShadowRoot.setHTMLUnsafe testcase agnostic/2, "<?Target data?>": FAIL
    • parseHTML testcase agnostic/2, "<?Target data?>": FAIL
    • parseHTMLUnsafe testcase agnostic/2, "<?Target data?>": FAIL
    • setHTMLUnsafe testcase agnostic/3, "<?target data?>": FAIL
    • ShadowRoot.setHTMLUnsafe testcase agnostic/3, "<?target data?>": FAIL
    • parseHTML testcase agnostic/3, "<?target data?>": FAIL
    • parseHTMLUnsafe testcase agnostic/3, "<?target data?>": FAIL
    • setHTMLUnsafe testcase agnostic/4, "<?target-1 data?><?target-2 data?>": FAIL
    • ShadowRoot.setHTMLUnsafe testcase agnostic/4, "<?target-1 data?><?target-2 data?>": FAIL
    • setHTML testcase agnostic/4, "<?target-1 data?><?target-2 data?>": FAIL
    • ShadowRoot.setHTML testcase agnostic/4, "<?target-1 data?><?target-2 data?>": FAIL
    • parseHTML testcase agnostic/4, "<?target-1 data?><?target-2 data?>": FAIL
    • parseHTMLUnsafe testcase agnostic/4, "<?target-1 data?><?target-2 data?>": FAIL
    • setHTMLUnsafe testcase agnostic/5, "<?target-1 data?><?target-2 data?>": FAIL
    • ShadowRoot.setHTMLUnsafe testcase agnostic/5, "<?target-1 data?><?target-2 data?>": FAIL
    • setHTML testcase agnostic/5, "<?target-1 data?><?target-2 data?>": FAIL
    • ShadowRoot.setHTML testcase agnostic/5, "<?target-1 data?><?target-2 data?>": FAIL
    • parseHTML testcase agnostic/5, "<?target-1 data?><?target-2 data?>": FAIL
    • parseHTMLUnsafe testcase agnostic/5, "<?target-1 data?><?target-2 data?>": FAIL
    • setHTMLUnsafe testcase unsafe-only/0, "<?target data?>": FAIL
    • ShadowRoot.setHTMLUnsafe testcase unsafe-only/0, "<?target data?>": FAIL
    • parseHTMLUnsafe testcase unsafe-only/0, "<?target data?>": FAIL
    • setHTMLUnsafe testcase unsafe-only/1, "<?target data?>": FAIL
    • ShadowRoot.setHTMLUnsafe testcase unsafe-only/1, "<?target data?>": FAIL
    • parseHTMLUnsafe testcase unsafe-only/1, "<?target data?>": FAIL
    • setHTMLUnsafe testcase unsafe-only/2, "<div><?target data?></div>": FAIL
    • ShadowRoot.setHTMLUnsafe testcase unsafe-only/2, "<div><?target data?></div>": FAIL
    • parseHTMLUnsafe testcase unsafe-only/2, "<div><?target data?></div>": FAIL
  • /sanitizer-api/sethtml-safety.html [wpt.fyi]
    • Testcase #2, setHTML("<div>Hello<script>World</script>xxx").: FAIL
    • Testcase #3, setHTML("<div>Hello<script>World</script>xxx").: FAIL
    • Testcase #4, setHTML("<svg>Hello<script>World</script>xxx").: FAIL
  • /sanitizer-api/sethtml-tree-construction.html [wpt.fyi]
    • Testcase #20, "<div>test<div>p</div>tt<p>div</p></div>", config: "{ "elements": ["p"], "replaceWithChildrenElements": ["div"] }".: FAIL
    • Testcase #54, "<p>comment<!-- hello -->in<!-- </p> -->text</p>", config: "undefined".: FAIL
    • Testcase #56, "<p>comment<!-- hello -->in<!-- </p> -->text</p>", config: "{ "comments": false }".: FAIL
    • Testcase #66, "<div>balabala<i>test</i></div><test>t</test><custom-element>custom-element</custom-element>", config: "{ "replaceWithChildrenElements": [123, "test", "i", "custom-element"],
      "elements": ["div"]}".: FAIL
    • Testcase #67, "<div>test<div>p</div>tt<p>div</p></div><test>test</test>", config: "{ "elements": ["p", "test"], "replaceWithChildrenElements": ["div"] }".: FAIL
    • Testcase #68, "test<div>p</div>tt<p>div</p><test>test</test>", config: "{ "elements": ["p", "test"], "replaceWithChildrenElements": ["div"] }".: FAIL
  • /sanitizer-api/sethtml-with-declarative-shadow-root.tentative.html [wpt.fyi]
    • shadowRoot.delegatesFocus does not propagate to the shadow root when shadowrootdelegatesfocus is removed by sanitizer: FAIL
    • shadowRoot.serializable does not propagate to the shadow root when shadowrootserializable is removed by sanitizer: FAIL
    • shadowRoot.clonable does not propagate to the shadow root when shadowrootclonable is removed by sanitizer: FAIL
    • shadowRoot.referenceTarget does not propagate to the shadow root when shadowrootreferencetarget is removed by sanitizer: FAIL
    • shadowRoot.customElementRegistry does not propagate to the shadow root when shadowrootcustomelementregistry is removed by sanitizer: FAIL
    • shadowRoot.adoptedStyleSheets does not propagate to the shadow root when shadowrootadoptedstylesheets is removed by sanitizer: FAIL
  • /sanitizer-api/sethtml-with-trustedtypes-createParserOptions-null.tentative.html [wpt.fyi]
    • TrustedParserOptions.sanitizer() is null when createParserOptions returns empty object: FAIL
    • Element.setHTMLUnsafe: when TrustedParserOptions has null sanitizer, no sanitization occurs: FAIL
  • /sanitizer-api/sethtml-with-trustedtypes-createParserOptions.tentative.html [wpt.fyi]
    • ShadowRoot.setHTMLUnsafe: passing a TrustedParserOptions overrides default policy: FAIL
    • Element.setHTMLUnsafe: passing a TrustedParserOptions overrides default policy: FAIL
  • /sanitizer-api/sethtml-with-trustedtypes-immutable.tentative.html [wpt.fyi]
    • createParserOptions doesn't mutate original object: FAIL
    • createParserOptions doesn't mutate sanitizer object: FAIL
    • TrustedParserOptions sanitizer clone testing with config input: FAIL
    • TrustedParserOptions sanitizer clone testing with Sanitizer object input: FAIL
    • TrustedParserOptions sanitizer clone testing with Preset string input: FAIL
  • /sanitizer-api/sethtml-with-trustedtypes.tentative.html [wpt.fyi]
    • ShadowRoot.setHTMLUnsafe: createParserOptions can inject a sanitizer config: FAIL
    • ShadowRoot.setHTMLUnsafe: createParserOptions can inject a sanitizer: FAIL
    • ShadowRoot.setHTMLUnsafe: createParserOptions can override a sanitizer config: FAIL
    • ShadowRoot.setHTMLUnsafe: createParserOptions returning 0 fails: FAIL
    • ShadowRoot.setHTMLUnsafe: createParserOptions returning 123 fails: FAIL
    • ShadowRoot.setHTMLUnsafe: createParserOptions returning "foo" fails: FAIL
    • ShadowRoot.innerHTML: createParserOptions can inject a sanitizer config: FAIL
    • ShadowRoot.innerHTML: createParserOptions can inject a sanitizer: FAIL
    • ShadowRoot.innerHTML: createParserOptions can override a sanitizer config: FAIL
    • ShadowRoot.innerHTML: createParserOptions returning 0 fails: FAIL
    • ShadowRoot.innerHTML: createParserOptions returning 123 fails: FAIL
    • ShadowRoot.innerHTML: createParserOptions returning "foo" fails: FAIL
    • ShadowRoot.beforebegin: createParserOptions can inject a sanitizer config: FAIL
    • ShadowRoot.beforebegin: createParserOptions can inject a sanitizer: FAIL
    • ShadowRoot.beforebegin: createParserOptions can override a sanitizer config: FAIL
    • ShadowRoot.beforebegin: createParserOptions returning 0 fails: FAIL
    • ShadowRoot.beforebegin: createParserOptions returning 123 fails: FAIL
    • ShadowRoot.beforebegin: createParserOptions returning "foo" fails: FAIL
    • ShadowRoot.afterend: createParserOptions can inject a sanitizer config: FAIL
    • ShadowRoot.afterend: createParserOptions can inject a sanitizer: FAIL
    • ShadowRoot.afterend: createParserOptions can override a sanitizer config: FAIL
    • ShadowRoot.afterend: createParserOptions returning 0 fails: FAIL
    • ShadowRoot.afterend: createParserOptions returning 123 fails: FAIL
    • ShadowRoot.afterend: createParserOptions returning "foo" fails: FAIL
    • ShadowRoot.setHTMLUnsafe: createParserOptions works after createHTML: FAIL
    • ShadowRoot.setHTMLUnsafe: exception in createParserOptions is rethrown: FAIL
    • ShadowRoot.innerHTML: exception in createParserOptions is rethrown: FAIL
    • ShadowRoot.beforebegin: exception in createParserOptions is rethrown: FAIL
    • ShadowRoot.afterend: exception in createParserOptions is rethrown: FAIL
    • Element.setHTMLUnsafe: createParserOptions can inject a sanitizer config: FAIL
    • Element.setHTMLUnsafe: createParserOptions can inject a sanitizer: FAIL
    • Element.setHTMLUnsafe: createParserOptions can override a sanitizer config: FAIL
    • Element.setHTMLUnsafe: createParserOptions returning 0 fails: FAIL
    • Element.setHTMLUnsafe: createParserOptions returning 123 fails: FAIL
    • Element.setHTMLUnsafe: createParserOptions returning "foo" fails: FAIL
    • Element.innerHTML: createParserOptions can inject a sanitizer config: FAIL
    • Element.innerHTML: createParserOptions can inject a sanitizer: FAIL
    • Element.innerHTML: createParserOptions can override a sanitizer config: FAIL
    • Element.innerHTML: createParserOptions returning 0 fails: FAIL
    • Element.innerHTML: createParserOptions returning 123 fails: FAIL
    • Element.innerHTML: createParserOptions returning "foo" fails: FAIL
    • Element.outerHTML: createParserOptions can inject a sanitizer config: FAIL
    • Element.outerHTML: createParserOptions can inject a sanitizer: FAIL
    • Element.outerHTML: createParserOptions can override a sanitizer config: FAIL
    • Element.outerHTML: createParserOptions returning 0 fails: FAIL
    • Element.outerHTML: createParserOptions returning 123 fails: FAIL
    • Element.outerHTML: createParserOptions returning "foo" fails: FAIL
    • Element.createContextualFragment: createParserOptions can inject a sanitizer config: FAIL
    • Element.createContextualFragment: createParserOptions can inject a sanitizer: FAIL
    • Element.createContextualFragment: createParserOptions can override a sanitizer config: FAIL
    • Element.createContextualFragment: createParserOptions returning 0 fails: FAIL
    • Element.createContextualFragment: createParserOptions returning 123 fails: FAIL
    • Element.createContextualFragment: createParserOptions returning "foo" fails: FAIL
    • Element.afterbegin: createParserOptions can inject a sanitizer config: FAIL
    • Element.afterbegin: createParserOptions can inject a sanitizer: FAIL
    • Element.afterbegin: createParserOptions can override a sanitizer config: FAIL
    • Element.afterbegin: createParserOptions returning 0 fails: FAIL
    • Element.afterbegin: createParserOptions returning 123 fails: FAIL
    • Element.afterbegin: createParserOptions returning "foo" fails: FAIL
    • Element.beforeend: createParserOptions can inject a sanitizer config: FAIL
    • Element.beforeend: createParserOptions can inject a sanitizer: FAIL
    • Element.beforeend: createParserOptions can override a sanitizer config: FAIL
    • Element.beforeend: createParserOptions returning 0 fails: FAIL
    • Element.beforeend: createParserOptions returning 123 fails: FAIL
    • Element.beforeend: createParserOptions returning "foo" fails: FAIL
    • Element.beforebegin: createParserOptions can inject a sanitizer config: FAIL
    • Element.beforebegin: createParserOptions can inject a sanitizer: FAIL
    • Element.beforebegin: createParserOptions can override a sanitizer config: FAIL
    • Element.beforebegin: createParserOptions returning 0 fails: FAIL
    • Element.beforebegin: createParserOptions returning 123 fails: FAIL
    • Element.beforebegin: createParserOptions returning "foo" fails: FAIL
    • Element.afterend: createParserOptions can inject a sanitizer config: FAIL
    • Element.afterend: createParserOptions can inject a sanitizer: FAIL
    • Element.afterend: createParserOptions can override a sanitizer config: FAIL
    • Element.afterend: createParserOptions returning 0 fails: FAIL
    • Element.afterend: createParserOptions returning 123 fails: FAIL
    • Element.afterend: createParserOptions returning "foo" fails: FAIL
    • Element.parseHTMLUnsafe: createParserOptions can inject a sanitizer config: FAIL
    • Element.parseHTMLUnsafe: createParserOptions can inject a sanitizer: FAIL
    • Element.parseHTMLUnsafe: createParserOptions can override a sanitizer config: FAIL
    • Element.parseHTMLUnsafe: createParserOptions can remove a sanitizer: FAIL
    • Element.parseHTMLUnsafe: createParserOptions returning 0 fails: FAIL
    • Element.parseHTMLUnsafe: createParserOptions returning 123 fails: FAIL
    • Element.parseHTMLUnsafe: createParserOptions returning "foo" fails: FAIL
    • Element: createContextualFragment with createParserOptions(runScripts=false) does not run scripts: FAIL
    • Element.setHTMLUnsafe: createParserOptions works after createHTML: FAIL
    • Element.setHTMLUnsafe: exception in createParserOptions is rethrown: FAIL
    • Element.innerHTML: exception in createParserOptions is rethrown: FAIL
    • Element.outerHTML: exception in createParserOptions is rethrown: FAIL
    • Element.createContextualFragment: exception in createParserOptions is rethrown: FAIL
    • Element.afterbegin: exception in createParserOptions is rethrown: FAIL
    • Element.beforeend: exception in createParserOptions is rethrown: FAIL
    • Element.beforebegin: exception in createParserOptions is rethrown: FAIL
    • Element.afterend: exception in createParserOptions is rethrown: FAIL
  • /sanitizer-api/sethtml-xml-document-sanitizer.tentative.html [wpt.fyi]
    • innerHTML on XML document throws TypeError if default policy provides a sanitizer: FAIL
    • outerHTML on XML document throws TypeError if default policy provides a sanitizer: FAIL
    • insertAdjacentHTML on XML document throws TypeError if default policy provides a sanitizer: FAIL
    • createContextualFragment on XML document throws TypeError if default policy provides a sanitizer: FAIL
    • innerHTML on XML document created by DOMParser throws TypeError if default policy provides a sanitizer: FAIL
    • innerHTML on XML document from XHR response throws TypeError if default policy provides a sanitizer: FAIL
  • /sanitizer-api/sethtml-xml-document.html [wpt.fyi]
    • Testcase #0, shadow inside xmlDoc, shadowroot.setHTML("Hello!"): FAIL
    • Testcase #1, shadow inside xmlDoc, shadowroot.setHTML("<br>"): FAIL
    • Testcase #2, shadow inside xmlDoc, shadowroot.setHTML("<p>Hi</p>"): FAIL
    • Testcase #3, shadow inside xmlDoc, shadowroot.setHTML("<iframe></iframe><p>text</p>"): FAIL
Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/3e5adbc1e502 https://hg.mozilla.org/integration/autoland/rev/cb3233f5d8cf [wpt PR 62484] - Sanitizer: Assert that different calls don't modify the baseline configuration or each other, a=testonly
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.