From: Marcin Haba Date: Sat, 30 Jun 2018 16:02:18 +0000 (+0200) Subject: baculum: Fix path validator for UTF-8 characters X-Git-Tag: Release-9.2.0~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eeed3454c5353fda46a2a3023bf16f68e4fc1b74;p=thirdparty%2Fbacula.git baculum: Fix path validator for UTF-8 characters --- diff --git a/gui/baculum/protected/Common/Class/Miscellaneous.php b/gui/baculum/protected/Common/Class/Miscellaneous.php index 37e8d315ea..0c907c25f8 100644 --- a/gui/baculum/protected/Common/Class/Miscellaneous.php +++ b/gui/baculum/protected/Common/Class/Miscellaneous.php @@ -207,7 +207,7 @@ class Miscellaneous extends TModule { } public function isValidPath($path) { - return (preg_match('/^[\p{L}\p{N}\p{Z}\[\]\(\)\-\+\/\\\:\.#~_,{}!]{0,1000}$/', $path) === 1); + return (preg_match('/^[\p{L}\p{N}\p{Z}\[\]\(\)\-\+\/\\\:\.#~_,{}!]{0,10000}$/u', $path) === 1); } public function isValidReplace($replace) {