Add password length when editting user

https://bugs.vestacp.com/issues/652
This commit is contained in:
Joe Mattos 2018-07-01 02:41:33 -04:00 committed by GitHub
commit f0b4a3b1c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,6 +82,11 @@ if (!empty($_POST['save'])) {
exit();
}
// Check password length
if ((!empty($_POST['v_password'])) && (strlen($_POST['v_password']) < 6) && (empty($_SESSION['error_msg']))) {
$_SESSION['error_msg'] = __('Password is too short.');
}
// Change password
if ((!empty($_POST['v_password'])) && (empty($_SESSION['error_msg']))) {
$v_password = tempnam("/tmp","vst");