diff options
author | preed%sigkill.com <> | 2003-07-22 19:23:27 +0000 |
---|---|---|
committer | preed%sigkill.com <> | 2003-07-22 19:23:27 +0000 |
commit | eec67d65c6405860b94ae00263e762821ccbea45 (patch) | |
tree | 5726173caae3f4eef221cd28a696ff74734a788a | |
parent | 388b25b0977d1f9e4d83856a14da6f85a519d3c6 (diff) | |
download | bugs-eec67d65c6405860b94ae00263e762821ccbea45.tar bugs-eec67d65c6405860b94ae00263e762821ccbea45.tar.gz bugs-eec67d65c6405860b94ae00263e762821ccbea45.tar.bz2 bugs-eec67d65c6405860b94ae00263e762821ccbea45.tar.xz bugs-eec67d65c6405860b94ae00263e762821ccbea45.zip |
Bug 183898 - checksetup.pl doesn't accepts admin passwords with dots; patch by jocuri@softhome.net (Vlad Dascalu); r/a=justdave
-rwxr-xr-x | checksetup.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/checksetup.pl b/checksetup.pl index 08583f82e..27542d8e4 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -3878,16 +3878,18 @@ if ($sth->rows == 0) { system("stty","-echo"); # disable input echoing while( $pass1 ne $pass2 ) { - while( $pass1 eq "" || $pass1 !~ /^[a-zA-Z0-9-_]{3,16}$/ ) { + while( $pass1 eq "" || $pass1 !~ /^[[:print:]]{3,16}$/ ) { print "Enter a password for the administrator account: "; $pass1 = $answer{'ADMIN_PASSWORD'} || ($silent && die("cant preload ADMIN_PASSWORD")) || <STDIN>; chomp $pass1; if(! $pass1 ) { - print "\n\nIt's just plain stupid to not have a password. Try again!\n"; + print "\n\nAn empty password is a security risk. Try again!\n"; } elsif ( $pass1 !~ /^.{3,16}$/ ) { print "\n\nThe password must be 3-16 characters in length.\n"; + } elsif ( $pass1 !~ /^[[:print:]]{3,16}$/ ) { + print "\n\nThe password contains non-printable characters.\n"; } } print "\nPlease retype the password to verify: "; |