RT#42235: Strict password requirments are not disabled for signup portal [respects...
[freeside.git] / FS / FS / ClientAPI / Signup.pm
index f255405..7c70a67 100644 (file)
@@ -698,6 +698,10 @@ sub new_customer {
         map { $_ => $packet->{$_} }
           qw( username _password sec_phrase popnum domsvc ),
       };
+      
+      my $error = $svc->is_password_allowed($packet->{_password});
+      $error = '' if $conf->config_bool('password-insecure', $agentnum);
+      return { error => $error } if $error;
 
       my @acct_snarf;
       my $snarfnum = 1;
@@ -834,8 +838,8 @@ sub new_customer {
 
       #this used to apply a credit, but now we can void invoices...
       foreach my $cust_bill (@cust_bill) {
-        my $voiderror = $cust_bill->void();
-        warn "Error voiding cust bill after decline: $voiderror";
+        my $voiderror = $cust_bill->void('automatic payment failed');
+        warn "Error voiding cust bill after decline: $voiderror" if $voiderror;
       }
 
       #should check list for errors...