diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-09-15 20:30:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-15 20:30:40 +0200 |
commit | e9adcde4648b54db8d40f314ca938dca5080bb9c (patch) | |
tree | bd826aa5f5857e063d575fec1ec16068712edd4a /Bugzilla/Install.pm | |
parent | 06c57b6e475767923f8294cf93fd746d45f3dc6f (diff) | |
download | bugzilla-e9adcde4648b54db8d40f314ca938dca5080bb9c.tar.gz bugzilla-e9adcde4648b54db8d40f314ca938dca5080bb9c.tar.xz |
Bug 1391702 - Replace Bugzilla::User::validate_password() with calls to Data::Password::passwdqc
Diffstat (limited to 'Bugzilla/Install.pm')
-rw-r--r-- | Bugzilla/Install.pm | 11 |
1 files changed, 8 insertions, 3 deletions
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 = <STDIN>; 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; |