Skip to content

Commit c1afd19

Browse files
committed
MC-13922: [Sec] XSS Injection in Admin For Map Location Attributes, Image Caption, Slide Name
- Resolve CR comments
1 parent 670274c commit c1afd19

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderImageTest.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,8 +1410,8 @@
14101410
<createData entity="_defaultCmsPage" stepKey="createCMSPage" />
14111411
</before>
14121412
<after>
1413-
<actionGroup ref="logout" stepKey="logout"/>
14141413
<deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage" />
1414+
<actionGroup ref="logout" stepKey="logout"/>
14151415
</after>
14161416
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage">
14171417
<argument name="CMSPage" value="$$createCMSPage$$"/>
@@ -1439,11 +1439,15 @@
14391439
<dontSeeJsError stepKey="dontSeeThrownError" />
14401440
<waitForElementVisible selector="{{ImageOnStage.caption('1')}}" stepKey="waitForImageCaption" />
14411441
<see selector="{{ImageOnStage.caption('1')}}" userInput="{{PageBuilderImageCaptionProperty_HtmlCode.value}}" stepKey="seeHtmlCodeInCaption" />
1442+
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
1443+
<dontSeeJsError stepKey="dontSeeThrownErrorAfterSave" />
14421444
<!-- Verify storefront -->
14431445
<comment userInput="Verify storefront" stepKey="commentVerifyStorefront"/>
1444-
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
1445-
<amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnPageTestPage"/>
1446+
<actionGroup ref="navigateToStorefrontForCreatedPage" stepKey="navigateToCmsPage">
1447+
<argument name="page" value="$$createCMSPage.identifier$$"/>
1448+
</actionGroup>
14461449
<waitForElementVisible selector="{{ImageOnStorefront.imageHasCaption}}" stepKey="waitForCaptionVisible" />
1450+
<dontSeeJsError stepKey="dontSeeThrownErrorOnStorefront" />
14471451
<see selector="{{ImageOnStorefront.imageHasCaption}}" userInput="{{PageBuilderImageCaptionProperty_HtmlCode.value}}" stepKey="seeHtmlCodeOnStorefront" />
14481452
</test>
14491453
</tests>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderMapLocationAttributeTests.xml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,14 +1014,13 @@
10141014
<group value="pagebuilder-requiresValidMapAPIKey"/>
10151015
</annotations>
10161016
<before>
1017-
<magentoCLI command="config:set cms/pagebuilder/google_maps_api_key {{googleMapsAPIKey.valid}}" stepKey="setValidGoogleMapsAPIKey"/>
10181017
<createData entity="_defaultCmsPage" stepKey="createCMSPage" />
10191018
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
10201019
</before>
10211020
<after>
10221021
<magentoCLI command="config:set cms/pagebuilder/google_maps_api_key ''" stepKey="setEmptyGoogleMapsAPIKey"/>
1023-
<actionGroup ref="logout" stepKey="logout"/>
10241022
<deleteData createDataKey="createCMSPage" stepKey="deletePreReqCMSPage" />
1023+
<actionGroup ref="logout" stepKey="logout"/>
10251024
</after>
10261025
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage">
10271026
<argument name="CMSPage" value="$$createCMSPage$$"/>
@@ -1084,6 +1083,13 @@
10841083
<argument name="country" value="PageBuilderMapCountry_USA"/>
10851084
</actionGroup>
10861085
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
1086+
<!-- Save Page and Set Valid API Key -->
1087+
<comment userInput="Save Page and Set Valid API Key" stepKey="commentSavePageAndSetKey"/>
1088+
<magentoCLI command="config:set cms/pagebuilder/google_maps_api_key {{googleMapsAPIKey.valid}}" stepKey="setValidGoogleMapsAPIKey"/>
1089+
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
1090+
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
1091+
<!-- Validate Stage -->
1092+
<comment userInput="Validate Stage" stepKey="commentValidateStage1"/>
10871093
<!-- Validate contents of tooltip on stage -->
10881094
<comment userInput="Validate contents of tooltip on stage" stepKey="commentValidateContentsOfTooltip" />
10891095
<actionGroup ref="validateMapPinLocationData" stepKey="validateMapTooltipStage">
@@ -1099,9 +1105,9 @@
10991105
</actionGroup>
11001106
<!-- Validate store front -->
11011107
<comment userInput="Validate storefront" stepKey="commentValidateStorefront" />
1102-
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
1103-
<amOnPage url="$$createCMSPage.identifier$$" stepKey="amOnPageTestPage"/>
1104-
<waitForPageLoad stepKey="waitForPageLoad" />
1108+
<actionGroup ref="navigateToStorefrontForCreatedPage" stepKey="navigateToCmsPage">
1109+
<argument name="page" value="$$createCMSPage.identifier$$"/>
1110+
</actionGroup>
11051111
<actionGroup ref="validateMapPinLocationData" stepKey="validateMapTooltipStorefront">
11061112
<argument name="page" value="MapOnStorefront" />
11071113
<argument name="locationName" value="PageBuilderMapLocationName_HtmlCode"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderSlideItemCommonTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,7 @@
18081808
<annotations>
18091809
<features value="PageBuilder"/>
18101810
<stories value="Slider"/>
1811-
<title value="Slide name does not render HTML"/>
1811+
<title value="Slide Item - Slide name does not render HTML"/>
18121812
<description value="The slide name does not render as HTML within the tooltip on the slide navigation dot"/>
18131813
<severity value="CRITICAL"/>
18141814
<useCaseId value="MC-13922"/>

0 commit comments

Comments
 (0)