diff options
author | Jonathan Prykop <jonathan@freeside.biz> | 2016-04-28 17:18:13 -0500 |
---|---|---|
committer | Jonathan Prykop <jonathan@freeside.biz> | 2016-04-28 17:18:13 -0500 |
commit | 06b3cebdee3d838cf25d51b5bd5668b47fec7a4e (patch) | |
tree | a05152658fb54358ca52bddfc372f0c74c8779d8 /FS/FS/ClientAPI | |
parent | f0cf935a32a2e0186dfff6c30513693965a68cf9 (diff) |
RT#42235: Strict password requirments are not disabled for signup portal [respects agent override]
Diffstat (limited to 'FS/FS/ClientAPI')
-rw-r--r-- | FS/FS/ClientAPI/MyAccount.pm | 7 | ||||
-rw-r--r-- | FS/FS/ClientAPI/Signup.pm | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 5b2421b75..9564e9c9f 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -3282,6 +3282,13 @@ sub validate_passwd { # end false laziness } + unless ($svc_acct) { + my $conf = new FS::Conf; + my $agentnum = $p->{'agentnum'}; + return { %result, 'password_valid' => 1 } + if $conf->config_bool('password-insecure', $p->{'agentnum'}); + } + $svc_acct ||= new FS::svc_acct {}; my $error = $svc_acct->is_password_allowed($p->{'check_password'}); diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm index a9678b051..7c70a6717 100644 --- a/FS/FS/ClientAPI/Signup.pm +++ b/FS/FS/ClientAPI/Signup.pm @@ -700,6 +700,7 @@ sub new_customer { }; my $error = $svc->is_password_allowed($packet->{_password}); + $error = '' if $conf->config_bool('password-insecure', $agentnum); return { error => $error } if $error; my @acct_snarf; |