md5 passwords can are 34 characters long and have $ in them.
[freeside.git] / FS / FS / svc_acct.pm
index 339081a..26c634b 100644 (file)
@@ -380,9 +380,8 @@ sub check {
     ;
 
     unless ( $recref->{username} eq 'sync' ) {
-      my($shell);
-      if ( $shell = (grep $_ eq $recref->{shell}, @shells)[0] ) {
-        $recref->{shell} = $shell;
+      if ( grep $_ eq $recref->{shell}, @shells ) {
+        $recref->{shell} = (grep $_ eq $recref->{shell}, @shells)[0];
       } else {
         return "Illegal shell \`". $self->shell. "\'; ".
                $conf->dir. "/shells contains: @shells";
@@ -437,7 +436,7 @@ sub check {
     #$recref->{password} = $1.
     #  crypt($3,$saltset[int(rand(64))].$saltset[int(rand(64))]
     #;
-  } elsif ( $recref->{_password} =~ /^((\*SUSPENDED\* )?)([\w\.\/]{13,24})$/ ) {
+  } elsif ( $recref->{_password} =~ /^((\*SUSPENDED\* )?)([\w\.\/\$]{13,34})$/ ) {
     $recref->{_password} = $1.$3;
   } elsif ( $recref->{_password} eq '*' ) {
     $recref->{_password} = '*';
@@ -473,7 +472,7 @@ sub radius {
 
 =head1 VERSION
 
-$Id: svc_acct.pm,v 1.4 2000-06-15 13:35:47 ivan Exp $
+$Id: svc_acct.pm,v 1.7 2000-06-29 11:56:52 ivan Exp $
 
 =head1 BUGS