[freeside-commits] freeside/FS/FS svc_acct.pm, 1.268.2.10, 1.268.2.11

Ivan,,, ivan at wavetail.420.am
Tue Jan 26 02:05:12 PST 2010


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv8830/FS/FS

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	svc_acct.pm 
Log Message:
more fallout from default pw encryption: fix error reporting when entering a bad password

Index: svc_acct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_acct.pm,v
retrieving revision 1.268.2.10
retrieving revision 1.268.2.11
diff -u -d -r1.268.2.10 -r1.268.2.11
--- svc_acct.pm	25 Jan 2010 22:17:28 -0000	1.268.2.10
+++ svc_acct.pm	26 Jan 2010 10:05:10 -0000	1.268.2.11
@@ -1333,11 +1333,14 @@
 sub set_password {
   my( $self, $pass ) = ( shift, shift );
 
+  warn "[$me] set_password (to $pass) called on $self: ". Dumper($self)
+     if $DEBUG;
+
   my $failure = gettext('illegal_password'). " $passwordmin-$passwordmax ".
                 FS::Msgcat::_gettext('illegal_password_characters').
                 ": ". $pass;
 
-  my ($encoding, $encryption);
+  my( $encoding, $encryption ) = ('', '');
 
   if ( $self->_password_encoding ) {
     $encoding = $self->_password_encoding;
@@ -1357,7 +1360,7 @@
     $self->_password_encoding($encoding);
   }
 
-  if( $encoding eq 'legacy' ) {
+  if ( $encoding eq 'legacy' ) {
 
     # The legacy behavior from check():
     # If the password is blank, randomize it and set encoding to 'plain'.
@@ -1374,14 +1377,12 @@
         $pass = $1.$3;
         $self->_password_encoding('crypt');
       # Various disabled crypt passwords
-      } elsif ( $pass eq '*' or
-              $pass eq '!' or
-              $pass eq '!!' ) {
+      } elsif ( $pass eq '*' || $pass eq '!' || $pass eq '!!' ) {
         $self->_password_encoding('crypt');
       } else {
         return $failure;
       }
-   }
+    }
 
     $self->_password($pass);
     return;



More information about the freeside-commits mailing list