Skip to content

Commit 626d917

Browse files
Merge branch 'AC-12871' into cia-2.4.8-beta2-develop-bugfix-10212024
2 parents 8872987 + 4426d35 commit 626d917

File tree

2 files changed

+3
-1
lines changed
  • app/code/Magento/Config

2 files changed

+3
-1
lines changed

app/code/Magento/Config/Block/System/Config/Form/Field/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected function _getDeleteCheckbox()
5555
$html .= '<input type="hidden" name="' .
5656
parent::getName() .
5757
'[value]" value="' .
58-
$this->getValue() .
58+
$this->_escaper->escapeHtml($this->getValue()) .
5959
'" />';
6060
$html .= '</div>';
6161
}

app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/FileTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,13 @@ public function testGetElementHtml(): void
114114
$expectedHtmlId = $this->testData['html_id_prefix']
115115
. $this->testData['html_id']
116116
. $this->testData['html_id_suffix'];
117+
$escapeValue = $this->testData['value'];
117118
$this->escaperMock->expects($this->any())->method('escapeHtml')->willReturnMap(
118119
[
119120
[$expectedHtmlId, null, $expectedHtmlId],
120121
[self::XSS_FILE_NAME_TEST, null, self::XSS_FILE_NAME_TEST],
121122
[self::INPUT_NAME_TEST, null, self::INPUT_NAME_TEST],
123+
[$escapeValue, null, $escapeValue],
122124
]
123125
);
124126

0 commit comments

Comments
 (0)