Skip to content

Commit a18a3d6

Browse files
committed
Merge branch 'ACQE-7048' into ACQE-7157-functional-tests-mainline-deployment
2 parents de94305 + 419fefe commit a18a3d6

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
* Copyright 2024 Adobe
7+
* All Rights Reserved.
8+
*/
9+
-->
10+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
12+
<entity name="EmailTemplateWithStoreddXSS" type="template">
13+
<data key="templateName">xss</data>
14+
<data key="templateSubject">Subjectxss</data>
15+
<data key="templateText">&lt;object data="data:text/html;base64,PHNjcmlwdD5hbGVydChkb2N1bWVudC5jb29raWUpOzwvc2NyaXB0Pg=="/&gt;</data>
16+
<data key="expectedTemplate"> </data>
17+
</entity>
18+
</entities>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
* Copyright 2024 Adobeststua
7+
* All Rights Reserved.
8+
*/
9+
-->
10+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
12+
<test name="AdminEmailTemplateForStoredXSSTest">
13+
<annotations>
14+
<features value="Email"/>
15+
<stories value="Email template for stored XSS"/>
16+
<title value="Email template with stored XSS should be escaped"/>
17+
<description value="Admin creates a email template with stored XSS and it should not appear in template preview"/>
18+
<severity value="MAJOR"/>
19+
<testCaseId value="AC-4237"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
</before>
24+
<after>
25+
<!--Delete created Template-->
26+
<actionGroup ref="DeleteEmailTemplateActionGroup" stepKey="deleteTemplate"/>
27+
<actionGroup ref="AdminClearGridFiltersActionGroup" stepKey="clearFilters"/>
28+
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
29+
</after>
30+
<actionGroup ref="CreateCustomTemplateActionGroup" stepKey="createTemplate">
31+
<argument name="template" value="EmailTemplateWithStoreddXSS"/>
32+
</actionGroup>
33+
<actionGroup ref="PreviewEmailTemplateActionGroup" stepKey="previewTemplate"/>
34+
<actionGroup ref="AssertEmailTemplateContentActionGroup" stepKey="assertContent">
35+
<argument name="expectedContent" value="{{EmailTemplateWithStoreddXSS.expectedTemplate}}"/>
36+
</actionGroup>
37+
</test>
38+
</tests>

0 commit comments

Comments
 (0)