From f0b4a3b1c14f710233357399a6e9055ac4def402 Mon Sep 17 00:00:00 2001 From: Joe Mattos Date: Sun, 1 Jul 2018 02:41:33 -0400 Subject: [PATCH] Add password length when editting user https://bugs.vestacp.com/issues/652 --- web/edit/user/index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/edit/user/index.php b/web/edit/user/index.php index 049ee20da..860fc2a51 100644 --- a/web/edit/user/index.php +++ b/web/edit/user/index.php @@ -81,6 +81,11 @@ if (!empty($_POST['save'])) { header('location: /login/'); 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']))) {