[freeside-commits] branch master updated. da590709ee5f3e6a661950fcfce39dbbf9d6add4

Mark Wells mark at 420.am
Tue Mar 13 13:35:31 PDT 2012


The branch, master has been updated
       via  da590709ee5f3e6a661950fcfce39dbbf9d6add4 (commit)
      from  fdd00d4549faaa9de8952402f77fa86d0b8b22ee (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit da590709ee5f3e6a661950fcfce39dbbf9d6add4
Author: Mark Wells <mark at freeside.biz>
Date:   Tue Mar 13 13:35:22 2012 -0700

    fix selfservice password change with ldap encoding, #16810

diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 7d177f9..acd0c6e 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -2485,7 +2485,7 @@ sub myaccount_passwd {
       unless $svc_acct->check_password($p->{'old_password'});
   }
 
-  $svc_acct->_password($p->{'new_password'});
+  $svc_acct->set_password($p->{'new_password'});
   my $error = $svc_acct->replace();
 
   my($label, $value) = $svc_acct->cust_svc->label;
@@ -2626,7 +2626,7 @@ sub process_reset_passwd {
   my $svc_acct = qsearchs('svc_acct', { 'svcnum' => $svcnum } )
     or return { 'error' => "Service not found" };
 
-  $svc_acct->_password($p->{'new_password'});
+  $svc_acct->set_password($p->{'new_password'});
   my $error = $svc_acct->replace();
 
   my($label, $value) = $svc_acct->cust_svc->label;
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm
index 139f927..e67db43 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -2524,7 +2524,8 @@ sub check_password {
 
   if ( $self->_password_encoding eq 'ldap' ) {
 
-    my $auth = from_rfc2307 Authen::Passphrase $self->_password;
+    $password =~ s/^{PLAIN}/{CLEARTEXT}/;
+    my $auth = from_rfc2307 Authen::Passphrase $password;
     return $auth->match($check_password);
 
   } elsif ( $self->_password_encoding eq 'crypt' ) {

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/ClientAPI/MyAccount.pm |    4 ++--
 FS/FS/svc_acct.pm            |    3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list