mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Check password length on the password reset form
We already check for a minimum password length on the account edit page. Add the same check to the password reset form (which is also used to set an initial password). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
571b74b901
commit
888b8d471f
1 changed files with 4 additions and 0 deletions
|
@ -25,6 +25,10 @@ if (isset($_GET['resetkey'], $_POST['email'], $_POST['password'], $_POST['confir
|
|||
$error = __('Missing a required field.');
|
||||
} elseif ($password != $confirm) {
|
||||
$error = __('Password fields do not match.');
|
||||
} elseif (!good_passwd($password)) {
|
||||
$length_min = config_get_int('options', 'passwd_min_len');
|
||||
$error = __("Your password must be at least %s characters.",
|
||||
$length_min);
|
||||
} elseif ($uid == null) {
|
||||
$error = __('Invalid e-mail.');
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue