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
Added recursive filtering sanitizeFileName(), vulnerability reported by @EvidentObscurity
givanz8c062a047a66
diff --git a/system/functions.php b/system/functions.phpindex 204bf3a..18d47d7 100755--- a/system/functions.php+++ b/system/functions.php@@ -1209,7 +1209,11 @@ function sanitizeFileName($file, $normalizePath = true) {//remove null bytes$file = str_replace(chr(0), '', $file);//sanitize, remove double dot .. and remove get parameters if any- $file = preg_replace('@\?.*$|\.{2,}|[^\w\-\./\\\]@' , '', $file);+ $prev = '';+ while ($prev != $file) {+ $prev = $file;+ $file = preg_replace('@\?.*$|\.{2,}|[^\w\-\./\\\]@' , '', $file);+ }//replace directory separators with OS specific separatorif ($normalizePath) {$file = str_replace(['\\', '/'], DS, $file);