Skip to content

Commit a86a460

Browse files
author
Deepak Tiwari
committed
AC-12738: Cart update API fix
1 parent 9a9f132 commit a86a460

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,10 @@ protected function _createFromArray($className, $data)
333333
)
334334
);
335335
}
336-
if (is_string($setterValue) && $this->containsXSS($setterValue)) {
336+
if (is_string($setterValue) && $this->validateParamsValue($setterValue)) {
337337
throw new InputException(
338338
new Phrase(
339-
'"%field_name" contains potentially harmful content.',
339+
'"%field_name" does not contains valid value.',
340340
['field_name' => $propertyName]
341341
)
342342
);
@@ -362,7 +362,7 @@ protected function _createFromArray($className, $data)
362362
* @param string $value
363363
* @return bool
364364
*/
365-
private function containsXSS(string $value)
365+
private function validateParamsValue(string $value)
366366
{
367367
// Check for <script> tags or any common XSS vectors
368368
return preg_match('/<script\b[^>]*>(.*?)<\/script>/is', $value) ||

0 commit comments

Comments
 (0)