From 8682daad58023fd6297945d602d2044f3e8f063f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 24 Feb 2009 16:30:39 -0500 Subject: Setup automator: Prompt for password twice. Closes: #516973 --- IkiWiki/Setup/Automator.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'IkiWiki/Setup') diff --git a/IkiWiki/Setup/Automator.pm b/IkiWiki/Setup/Automator.pm index 42caf3039..b63c8e245 100644 --- a/IkiWiki/Setup/Automator.pm +++ b/IkiWiki/Setup/Automator.pm @@ -110,11 +110,20 @@ sub import (@) { next if $admin=~/^http\?:\/\//; # openid # Prompt for password w/o echo. + my ($password, $password2); system('stty -echo 2>/dev/null'); local $|=1; print "\n\nCreating wiki admin $admin ...\n"; - print "Choose a password: "; - chomp(my $password=); + for (;;) { + print "Choose a password: "; + chomp($password=); + print "Confirm password: "; + chomp($password2=); + + last if $password2 ne $password; + + print "Password mismatch.\n\n"; + } print "\n\n\n"; system('stty sane 2>/dev/null'); -- cgit v1.2.3 From 062f87ce3807155ff57bf316685f9bb500726867 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 1 Mar 2009 15:01:08 -0500 Subject: Setup automator: Fix bug in password comparison. Closes: #517654 --- IkiWiki/Setup/Automator.pm | 2 +- debian/changelog | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'IkiWiki/Setup') diff --git a/IkiWiki/Setup/Automator.pm b/IkiWiki/Setup/Automator.pm index b63c8e245..7d9eca3af 100644 --- a/IkiWiki/Setup/Automator.pm +++ b/IkiWiki/Setup/Automator.pm @@ -120,7 +120,7 @@ sub import (@) { print "Confirm password: "; chomp($password2=); - last if $password2 ne $password; + last if $password2 eq $password; print "Password mismatch.\n\n"; } diff --git a/debian/changelog b/debian/changelog index 4e62b0971..82445e837 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ikiwiki (3.06) UNRELEASED; urgency=low + + * Setup automator: Fix bug in password comparison. Closes: #517654 + + -- Joey Hess Sun, 01 Mar 2009 15:00:39 -0500 + ikiwiki (3.05) unstable; urgency=low * debhelper v7(.0.50); rules file minimisation. -- cgit v1.2.3