projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
469c10d
)
RT#39481: Password Maximum Length
author
Jonathan Prykop
<jonathan@freeside.biz>
Wed, 6 Jan 2016 04:19:26 +0000
(22:19 -0600)
committer
Jonathan Prykop
<jonathan@freeside.biz>
Wed, 6 Jan 2016 04:19:26 +0000
(22:19 -0600)
FS/FS/ClientAPI/MyAccount/contact.pm
patch
|
blob
|
history
FS/FS/Password_Mixin.pm
patch
|
blob
|
history
FS/FS/svc_acct.pm
patch
|
blob
|
history
httemplate/edit/cust_main/first_pkg/svc_acct.html
patch
|
blob
|
history
httemplate/edit/svc_acct.cgi
patch
|
blob
|
history
diff --git
a/FS/FS/ClientAPI/MyAccount/contact.pm
b/FS/FS/ClientAPI/MyAccount/contact.pm
index
c893c10
..
dd3a40b
100644
(file)
--- a/
FS/FS/ClientAPI/MyAccount/contact.pm
+++ b/
FS/FS/ClientAPI/MyAccount/contact.pm
@@
-26,12
+26,7
@@
sub contact_passwd {
my $error = '';
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'});
$error ||= $contact->is_password_allowed($p->{'new_password'});
diff --git
a/FS/FS/Password_Mixin.pm
b/FS/FS/Password_Mixin.pm
index
834fd6f
..
0f75960
100644
(file)
--- 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;
# 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)
$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
53b12f1
..
59d1e04
100644
(file)
--- 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;
$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');
$username_letter = $conf->exists('username-letter');
$username_letterfirst = $conf->exists('username-letterfirst');
$username_noperiod = $conf->exists('username-noperiod');
diff --git
a/httemplate/edit/cust_main/first_pkg/svc_acct.html
b/httemplate/edit/cust_main/first_pkg/svc_acct.html
index
8308af4
..
3644d62
100644
(file)
--- a/
httemplate/edit/cust_main/first_pkg/svc_acct.html
+++ b/
httemplate/edit/cust_main/first_pkg/svc_acct.html
@@
-78,7
+78,7
@@
my $conf = new FS::Conf;
my $ulen = dbdef->table('svc_acct')->column('username')->length;
my $ulen2 = $ulen+2;
my $ulen = dbdef->table('svc_acct')->column('username')->length;
my $ulen2 = $ulen+2;
-my $passwordmax = $conf->config('passwordmax') ||
8
;
+my $passwordmax = $conf->config('passwordmax') ||
12
;
my $pmax2 = $passwordmax + 2;
</%init>
my $pmax2 = $passwordmax + 2;
</%init>
diff --git
a/httemplate/edit/svc_acct.cgi
b/httemplate/edit/svc_acct.cgi
index
0cf0c20
..
ca26c6c
100755
(executable)
--- a/
httemplate/edit/svc_acct.cgi
+++ b/
httemplate/edit/svc_acct.cgi
@@
-553,7
+553,7
@@
my $ulen =
: dbdef->table('svc_acct')->column('username')->length;
my $ulen2 = $ulen+2;
: dbdef->table('svc_acct')->column('username')->length;
my $ulen2 = $ulen+2;
-my $pmax = max($conf->config('passwordmax') || 1
3
);
+my $pmax = max($conf->config('passwordmax') || 1
2
);
my $pmax2 = $pmax+2;
my $p1 = popurl(1);
my $pmax2 = $pmax+2;
my $p1 = popurl(1);