From 494027785bdb7db53e60c11ef03c144b61cd3172 Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Thu, 26 Jan 2023 09:57:27 +0000 Subject: [PATCH] Merge pull request from GHSA-3p73-mm7v-4f6m Co-authored-by: Judx --- .../core/Mage/Core/Model/Input/Filter/MaliciousCode.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/code/core/Mage/Core/Model/Input/Filter/MaliciousCode.php b/app/code/core/Mage/Core/Model/Input/Filter/MaliciousCode.php index bed2d44cbe4..fe6a2cd64eb 100644 --- a/app/code/core/Mage/Core/Model/Input/Filter/MaliciousCode.php +++ b/app/code/core/Mage/Core/Model/Input/Filter/MaliciousCode.php @@ -58,17 +58,15 @@ class Mage_Core_Model_Input_Filter_MaliciousCode implements Zend_Filter_Interfac * Filter value * * @param string|array $value - * @return string|array Filtered value + * @return string|array */ public function filter($value) { - $result = false; do { - $subject = $result ? $result : $value; - $result = preg_replace($this->_expressions, '', $subject, -1, $count); + $value = preg_replace($this->_expressions, '', $value, -1, $count); } while ($count !== 0); - return $result; + return $value; } /**