From a193e240f5ea41509276ede529c68642af2ec656 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Wed, 15 May 2019 15:35:54 +0200 Subject: Loosen restrictions on passwords a bit Maximum length increased from 64 to 500 characters, and all Unicode characters are now allowed. --- lib/VNDB/Handler/Users.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/VNDB/Handler/Users.pm b/lib/VNDB/Handler/Users.pm index d1f0df93..56664443 100644 --- a/lib/VNDB/Handler/Users.pm +++ b/lib/VNDB/Handler/Users.pm @@ -175,7 +175,7 @@ sub login { return if !$self->authCheckCode; $frm = $self->formValidate( { post => 'usrname', required => 1, minlength => 2, maxlength => 15 }, - { post => 'usrpass', required => 1, minlength => 4, maxlength => 64, template => 'ascii' }, + { post => 'usrpass', required => 1, minlength => 4, maxlength => 500 }, ); if(!$frm->{_err}) { @@ -277,8 +277,8 @@ sub setpass { if($self->reqMethod eq 'POST') { return if !$self->authCheckCode("/u$u->{id}/setpass?t=$t"); $frm = $self->formValidate( - { post => 'usrpass', minlength => 4, maxlength => 64, template => 'ascii' }, - { post => 'usrpass2', minlength => 4, maxlength => 64, template => 'ascii' }, + { post => 'usrpass', minlength => 4, maxlength => 500 }, + { post => 'usrpass2', minlength => 4, maxlength => 500 }, ); push @{$frm->{_err}}, 'Passwords do not match' if $frm->{usrpass} ne $frm->{usrpass2}; @@ -397,9 +397,9 @@ sub edit { { post => 'ign_votes', required => 0, default => 0 }, ) : (), { post => 'mail', template => 'email' }, - { post => 'curpass', required => 0, minlength => 4, maxlength => 64, template => 'ascii', default => '' }, - { post => 'usrpass', required => 0, minlength => 4, maxlength => 64, template => 'ascii' }, - { post => 'usrpass2', required => 0, minlength => 4, maxlength => 64, template => 'ascii' }, + { post => 'curpass', required => 0, minlength => 4, maxlength => 500, default => '' }, + { post => 'usrpass', required => 0, minlength => 4, maxlength => 500 }, + { post => 'usrpass2', required => 0, minlength => 4, maxlength => 500 }, { post => 'hide_list', required => 0, default => 0, enum => [0,1] }, { post => 'show_nsfw', required => 0, default => 0, enum => [0,1] }, { post => 'traits_sexual', required => 0, default => 0, enum => [0,1] }, -- cgit v1.2.3