From e9adcde4648b54db8d40f314ca938dca5080bb9c Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Fri, 15 Sep 2017 14:30:40 -0400 Subject: Bug 1391702 - Replace Bugzilla::User::validate_password() with calls to Data::Password::passwdqc --- Bugzilla/Install.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Install.pm') diff --git a/Bugzilla/Install.pm b/Bugzilla/Install.pm index 3f8d4bdfb..ced559111 100644 --- a/Bugzilla/Install.pm +++ b/Bugzilla/Install.pm @@ -500,9 +500,14 @@ sub _prompt_for_password { print "\n", get_text('install_confirm_password'), ' '; my $pass2 = ; chomp $pass2; - eval { validate_password($password, $pass2); }; - if ($@) { - print "\n$@\n"; + my $pwqc = Bugzilla->passwdqc; + my $ok = $pwqc->validate_password($password); + if (!$ok) { + print "\n", $pwqc->reason, "\n"; + undef $password; + } + elsif ($password ne $pass2) { + print "\n", "passwords do not match\n"; undef $password; } system("stty","echo") unless ON_WINDOWS; -- cgit v1.2.3-24-g4f1b