Skip to content

Commit dccda60

Browse files
author
Deepak Tiwari
committed
AC-12738: Fixed web api test case
1 parent a86a460 commit dccda60

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,16 +357,14 @@ protected function _createFromArray($className, $data)
357357
}
358358

359359
/**
360-
* Check if input value contains any XSS vector
360+
* Validate input param value
361361
*
362362
* @param string $value
363363
* @return bool
364364
*/
365365
private function validateParamsValue(string $value)
366366
{
367-
// Check for <script> tags or any common XSS vectors
368-
return preg_match('/<script\b[^>]*>(.*?)<\/script>/is', $value) ||
369-
preg_match('/[<>]/', $value);
367+
return preg_match('/<script\b[^>]*>(.*?)<\/script>/is', $value);
370368
}
371369

372370
/**

0 commit comments

Comments
 (0)