[freeside-commits] branch FREESIDE_2_3_BRANCH updated. a59a347762666a70920ed975ce207568896ae19c

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


The branch, FREESIDE_2_3_BRANCH has been updated
       via  a59a347762666a70920ed975ce207568896ae19c (commit)
      from  aaaff38cf2f6826e2329f24a318f0122d50e70f3 (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 a59a347762666a70920ed975ce207568896ae19c
Author: Mark Wells <mark at freeside.biz>
Date:   Tue Mar 13 13:34:54 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 a909dd4..28c0197 100644
--- a/FS/FS/svc_acct.pm
+++ b/FS/FS/svc_acct.pm
@@ -2522,7 +2522,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