File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed
app/code/Magento/Email/Test/Mftf Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
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" >< object data="data:text/html;base64,PHNjcmlwdD5hbGVydChkb2N1bWVudC5jb29raWUpOzwvc2NyaXB0Pg=="/> </data >
16
+ <data key =" expectedTemplate" > </data >
17
+ </entity >
18
+ </entities >
Original file line number Diff line number Diff line change
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 >
You can’t perform that action at this time.
0 commit comments