diff --git a/lib/Froxlor/Api/Commands/DirProtections.php b/lib/Froxlor/Api/Commands/DirProtections.php index 8b478103a..690adf8b9 100644 --- a/lib/Froxlor/Api/Commands/DirProtections.php +++ b/lib/Froxlor/Api/Commands/DirProtections.php @@ -87,7 +87,8 @@ public function add() $path = FileDir::makeCorrectDir($customer['documentroot'] . '/' . $path); $username = Validate::validate($username, 'username', '/^[a-zA-Z0-9][a-zA-Z0-9\-_]+\$?$/', '', [], true); $authname = Validate::validate($authname, 'directory_authname', '/^[a-zA-Z0-9][a-zA-Z0-9\-_ ]+\$?$/', '', [], true); - Validate::validate($password, 'password', '', '', [], true); + $password = Validate::validate($password, 'password', '', '', [], true); + $password = Crypt::validatePassword($password, true); // check for duplicate usernames for the path $username_path_check_stmt = Database::prepare(" @@ -244,7 +245,8 @@ public function update() // validation $authname = Validate::validate($authname, 'directory_authname', '/^[a-zA-Z0-9][a-zA-Z0-9\-_ ]+\$?$/', '', [], true); - Validate::validate($password, 'password', '', '', [], true); + $password = Validate::validate($password, 'password', '', '', [], true); + $password = Crypt::validatePassword($password, true); $upd_query = ""; $upd_params = [