projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix implicit RADIUS password attribute to be Crypt-Password for encrypted pw's
[freeside.git]
/
FS
/
FS
/
svc_acct.pm
diff --git
a/FS/FS/svc_acct.pm
b/FS/FS/svc_acct.pm
index
04a86a8
..
6c0807d
100644
(file)
--- a/
FS/FS/svc_acct.pm
+++ b/
FS/FS/svc_acct.pm
@@
-791,7
+791,7
@@
sub check {
#$recref->{password} = $1.
# crypt($3,$saltset[int(rand(64))].$saltset[int(rand(64))]
#;
#$recref->{password} = $1.
# crypt($3,$saltset[int(rand(64))].$saltset[int(rand(64))]
#;
- } elsif ( $recref->{_password} =~ /^((\*SUSPENDED\* )?)([\w\.\/\$\;]{13,34})$/ ) {
+ } elsif ( $recref->{_password} =~ /^((\*SUSPENDED\* )?)([\w\.\/\$\;
\+
]{13,34})$/ ) {
$recref->{_password} = $1.$3;
} elsif ( $recref->{_password} eq '*' ) {
$recref->{_password} = '*';
$recref->{_password} = $1.$3;
} elsif ( $recref->{_password} eq '*' ) {
$recref->{_password} = '*';
@@
-857,7
+857,9
@@
expected to change in the future.
sub radius_check {
my $self = shift;
sub radius_check {
my $self = shift;
- ( 'Password' => $self->_password,
+ my $password = $self->_password;
+ my $pw_attrib = length($password) <= 12 ? 'Password' : 'Crypt-Password';
+ ( $pw_attrib => $password,
map {
/^(rc_(.*))$/;
my($column, $attrib) = ($1, $2);
map {
/^(rc_(.*))$/;
my($column, $attrib) = ($1, $2);