Skip to content

Commit 4358a32

Browse files
committed
Docs: DOC-3355 - Prevent valid iframe and script elements from being removed by DOMPurify
1 parent 9378169 commit 4358a32

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

modules/ROOT/pages/8.5.0-release-notes.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,20 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a
110110

111111
// CCFR here.
112112

113+
=== Script elements would incorrectly be removed by DOMPurify when considered valid in the schema
114+
// #TINY-9655
115+
116+
Previously, `script` elements that were explicitly allowed through xref:content-filtering.adoc#valid_elements[`+valid_elements+`] or xref:content-filtering.adoc#extended_valid_elements[`+extended_valid_elements+`] were removed during the sanitization process when xref:content-filtering.adoc#xss_sanitization[`+xss_sanitization+`] was enabled. DOMPurify flagged these elements as potential mXSS vectors and removed them entirely, even when the schema configuration indicated they were valid.
117+
118+
In {productname} {release-version}, `script` elements that are considered valid in the schema are retained during sanitization. The sanitization process still removes unsafe attributes and content, but no longer removes the entire element when the schema explicitly allows it.
119+
120+
=== Iframe elements with children would incorrectly be removed by DOMPurify
121+
// #TINY-9655
122+
123+
Previously, `iframe` elements that contained child nodes were removed entirely during the sanitization process, even when the editor configuration allowed iframes. DOMPurify treated the presence of child nodes within an `iframe` as a potential mXSS risk and stripped the entire element from the content.
124+
125+
In {productname} {release-version}, `iframe` elements are preserved during sanitization. Any child nodes and unsafe or invalid attributes are removed, but the `iframe` element itself remains in the editor content.
126+
113127

114128
[[security-fixes]]
115129
== Security fixes

modules/ROOT/pages/fullpagehtml.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ include::partial$misc/bundling-guide-link.adoc[]
4141
[WARNING]
4242
====
4343
**Certain elements may be removed by XSS sanitization**
44-
By default, {productname} sanitizes HTML content to protect against XSS attacks. Elements outside the HTML5 specification, such as `<script>`, are removed. Standard `<meta>` tags are preserved, but attributes not defined in the HTML5 spec (for example, the RDFa `property` attribute) require explicit configuration to be retained.
44+
By default, {productname} sanitizes HTML content to protect against XSS attacks. Elements outside the HTML5 specification, such as `<script>`, are removed unless explicitly allowed through xref:content-filtering.adoc#valid_elements[`+valid_elements+`] or xref:content-filtering.adoc#extended_valid_elements[`+extended_valid_elements+`]. Standard `<meta>` tags are preserved, but attributes not defined in the HTML5 spec (for example, the RDFa `property` attribute) require explicit configuration to be retained.
4545
4646
If integrators encounter issues with required elements being removed, the following configuration options are available. These options reduce security and should be used with caution:
4747

0 commit comments

Comments
 (0)