Skip to content

Commit 0acb5f2

Browse files
pradeep1819devarul
authored andcommitted
ACP2E-1462: Not secure response for 400 error from the server
1 parent c5e4bc5 commit 0acb5f2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

app/code/Magento/Customer/Controller/Section/Load.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ public function execute()
6969
$resultJson->setHeader('Pragma', 'no-cache', true);
7070
try {
7171
$sectionNames = $this->getRequest()->getParam('sections');
72-
$sectionNames = $sectionNames ? array_unique(\explode(',', $sectionNames)) : null;
72+
$sectionNames = $sectionNames
73+
? array_unique(is_array($sectionNames) ? $sectionNames : explode(',', $sectionNames))
74+
: null;
7375

7476
$forceNewSectionTimestamp = $this->getRequest()->getParam('force_new_section_timestamp');
7577
if ('false' === $forceNewSectionTimestamp) {

app/code/Magento/Customer/Test/Unit/Controller/Section/LoadTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@ public function executeDataProvider()
146146
'sectionNamesAsArray' => null,
147147
'forceNewTimestamp' => false
148148
],
149+
[
150+
'sectionNames' => ['sectionName1', 'sectionName2', 'sectionName3'],
151+
'forceNewSectionTimestamp' => 'forceNewSectionTimestamp',
152+
'sectionNamesAsArray' => ['sectionName1', 'sectionName2', 'sectionName3'],
153+
'forceNewTimestamp' => true
154+
],
149155
];
150156
}
151157

0 commit comments

Comments
 (0)