Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
Changed sanitizeHTML to strip javascript code inside tags with escaped entities, fix for GHSA-39gc-pjv5-4w4p reported by @elvinsuleymanov
givanz7e02b0e1a375
diff --git a/system/functions.php b/system/functions.phpindex e179bc9..9ef7b45 100755--- a/system/functions.php+++ b/system/functions.php@@ -1434,9 +1434,9 @@ function sanitizeHTML($string) {return $string;}- //$string = stripTags($string);-// Fix &entity\n;+ //add <> before tag entities to allow regex matching+ $string = str_replace(['<', '>'], ['<<', '>>'], $string);$string = str_replace(['&', '<', '>'], ['&amp;', '&lt;', '&gt;'], $string);$string = preg_replace('/(&#*\w+)[\x00-\x20]+;/u', '$1;', $string);$string = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $string);@@ -1465,6 +1465,8 @@ function sanitizeHTML($string) {$string = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $string);} while ($string !== $string);+ //restore entities+ $string = str_replace(['<<', '>>'], ['<', '>'], $string);return $string;}