X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FPassword_Mixin.pm;h=b29cf571365fdae310c4e59d85816752c939185b;hp=3dd9ce4b0f0229f35aa3edee377a5c84dfb10b7c;hb=3adb46fccf9f631e188ea5383bd147b340477639;hpb=2b2e19ae4838d1d788b244ceff85957c52b0655f diff --git a/FS/FS/Password_Mixin.pm b/FS/FS/Password_Mixin.pm index 3dd9ce4b0..b29cf5713 100644 --- a/FS/FS/Password_Mixin.pm +++ b/FS/FS/Password_Mixin.pm @@ -46,7 +46,7 @@ sub is_password_allowed { # basic checks using Data::Password; # options for Data::Password $DICTIONARY = 0; # minimum length of disallowed words, false value disables dictionary checking - $MINLEN = $conf->config('passwordmin') || 6; + $MINLEN = $conf->config('passwordmin') || 8; $MAXLEN = $conf->config('passwordmax') || 12; $GROUPS = 4; # must have all 4 'character groups': numbers, symbols, uppercase, lowercase # other options use the defaults listed below: @@ -82,7 +82,9 @@ sub is_password_allowed { return '' unless $self->get($self->primary_key); # for validating new passwords pre-insert #check against customer fields - my $cust_main = $self->cust_main; + my $cust_main = $self->table eq 'access_user' + ? $self->user_cust_main + : $self->cust_main; if ($cust_main) { my @words; # words from cust_main