[dw-free] Verify that bad-password checking is implemented & enabled
[commit: http://hg.dwscoalition.org/dw-free/rev/51008c0d151e]
http://bugs.dwscoalition.org/show_bug.cgi?id=446
Fix some bugs in bad password checking.
Patch by
janinedog.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=446
Fix some bugs in bad password checking.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/LJ/CreatePage.pm
-------------------------------------------------------------------------------- diff -r 9fbd871d8aeb -r 51008c0d151e cgi-bin/LJ/CreatePage.pm --- a/cgi-bin/LJ/CreatePage.pm Wed Apr 01 03:50:07 2009 +0000 +++ b/cgi-bin/LJ/CreatePage.pm Wed Apr 01 03:53:11 2009 +0000 @@ -81,10 +81,10 @@ sub verify_password { $name = $u->name_raw; } - $password = $opts{password}; - $username = $opts{username}; - $email = $opts{email}; - $name = $opts{name}; + $password = $opts{password} if $opts{password}; + $username = $opts{username} if $opts{username}; + $email = $opts{email} if $opts{email}; + $name = $opts{name} if $opts{name}; # password must exist return LJ::Widget::CreateAccount->ml( 'widget.createaccount.error.password.blank' ) @@ -124,7 +124,7 @@ sub verify_password { # at least 4 unique characters my %unique_chars = map { $_ => 1 } split( //, $password ); return LJ::Widget::CreateAccount->ml( 'widget.createaccount.error.password.needsmoreuniquechars' ) - unless scalar keys %unique_chars > 4; + unless scalar keys %unique_chars >= 4; # contains at least one digit or symbol return LJ::Widget::CreateAccount->ml( 'widget.createaccount.error.password.needsnonletter' ) --------------------------------------------------------------------------------