diff --git a/lib/Util.php b/lib/Util.php index ed617634..3ba19b2a 100644 --- a/lib/Util.php +++ b/lib/Util.php @@ -299,7 +299,7 @@ class Util */ public static function sanitizePath(string $path) { - $path = mb_ereg_replace('([^\\w\\s\\d\\-_~,;:!@#$&*{}\[\]\'\\[\\]\\(\\).\\\/])', '', $path); + $path = str_replace("\0", '', $path); // remove null characters return mb_ereg_replace('\/\/+', '/', $path); // remove extra slashes }