Skip to content

Commit c4de4a1

Browse files
committed
MC-10871: [Sec] XSS Injection in HTML Code Content Type
- Reset DOM document instance on afterFilter call
1 parent 788adef commit c4de4a1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/code/Magento/PageBuilder/Plugin/Filter/TemplatePlugin.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public function __construct(
5252
*/
5353
public function afterFilter(\Magento\Framework\Filter\Template $subject, string $result) : string
5454
{
55+
$this->domDocument = false;
56+
5557
// Validate if the filtered result requires background image processing
5658
if (strpos($result, self::DATA_BACKGROUND_IMAGE) !== false) {
5759
$document = $this->getDomDocument($result);

0 commit comments

Comments
 (0)