summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/ClientAPI/MyAccount/contact.pm7
-rw-r--r--FS/FS/Password_Mixin.pm2
-rw-r--r--FS/FS/svc_acct.pm2
3 files changed, 3 insertions, 8 deletions
diff --git a/FS/FS/ClientAPI/MyAccount/contact.pm b/FS/FS/ClientAPI/MyAccount/contact.pm
index c893c105d..dd3a40b92 100644
--- a/FS/FS/ClientAPI/MyAccount/contact.pm
+++ b/FS/FS/ClientAPI/MyAccount/contact.pm
@@ -26,12 +26,7 @@ sub contact_passwd {
my $error = '';
- # use these svc_acct length restrictions??
- my $conf = new FS::Conf;
- $error = 'Password too short.'
- if length($p->{'new_password'}) < ($conf->config('passwordmin') || 6);
- $error = 'Password too long.'
- if length($p->{'new_password'}) > ($conf->config('passwordmax') || 8);
+ # length checks now in is_password_allowed
$error ||= $contact->is_password_allowed($p->{'new_password'});
diff --git a/FS/FS/Password_Mixin.pm b/FS/FS/Password_Mixin.pm
index 834fd6fc3..0f75960f7 100644
--- a/FS/FS/Password_Mixin.pm
+++ b/FS/FS/Password_Mixin.pm
@@ -47,7 +47,7 @@ sub is_password_allowed {
# options for Data::Password
$DICTIONARY = 4; # minimum length of disallowed words
$MINLEN = $conf->config('passwordmin') || 6;
- $MAXLEN = $conf->config('passwordmax') || 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:
# $FOLLOWING = 3; # disallows more than 3 chars in a row, by alphabet or keyboard (ie abcd or asdf)
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm
index 53b12f181..59d1e04f9 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -72,7 +72,7 @@ FS::UID->install_callback( sub {
$passwordmin = ( defined($passwordmin) && $passwordmin =~ /\d+/ )
? $passwordmin
: 6;
- $passwordmax = $conf->config('passwordmax') || 8;
+ $passwordmax = $conf->config('passwordmax') || 12;
$username_letter = $conf->exists('username-letter');
$username_letterfirst = $conf->exists('username-letterfirst');
$username_noperiod = $conf->exists('username-noperiod');