summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Install.pm')
-rw-r--r--Bugzilla/Install.pm11
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;