X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FPassword_Mixin.pm;h=a27dd54534ad724e83fcc982c1c656f8c531504f;hp=ee038db5a778ee70e3dcf7495902d97d4ea77497;hb=c90a529450dd85902449788fd83940471be50377;hpb=fc299d99343e617911adc2aaf8de3063cbf4ab2a diff --git a/FS/FS/Password_Mixin.pm b/FS/FS/Password_Mixin.pm index ee038db5a..a27dd5453 100644 --- a/FS/FS/Password_Mixin.pm +++ b/FS/FS/Password_Mixin.pm @@ -45,6 +45,9 @@ sub is_password_allowed { my $self = shift; my $password = shift; + my $cust_main = $self->cust_main; + return '' if $cust_main && $conf->config_bool('password-insecure', $cust_main->agentnum); + # basic checks using Data::Password; # options for Data::Password $DICTIONARY = 4; # minimum length of disallowed words @@ -70,7 +73,6 @@ 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; if ($cust_main) { my @words; # words from cust_main