phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpgwapi/inc class.auth_ldap.inc.php,1.17.2.1,1


From: Lars Kneschke <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.auth_ldap.inc.php,1.17.2.1,1.17.2.1.2.1 class.common.inc.php,1.123.2.9.2.6,1.123.2.9.2.7
Date: Mon, 05 May 2003 02:29:08 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv4868/inc

Modified Files:
      Tag: Version-0_9_16-branch
        class.auth_ldap.inc.php class.common.inc.php 
Log Message:
make encrypt_password working again

the values changed to lower case

make the function return false in case of failure



Index: class.auth_ldap.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.auth_ldap.inc.php,v
retrieving revision 1.17.2.1
retrieving revision 1.17.2.1.2.1
diff -C2 -r1.17.2.1 -r1.17.2.1.2.1
*** class.auth_ldap.inc.php     24 Nov 2002 01:45:03 -0000      1.17.2.1
--- class.auth_ldap.inc.php     5 May 2003 06:29:06 -0000       1.17.2.1.2.1
***************
*** 49,53 ****
                                return False;
                        }
-                       
                        /* find the dn for this uid, the uid is not always in 
the dn */
                        $attributes = array( "uid", "dn" );
--- 49,52 ----
***************
*** 90,94 ****
                        $sri = ldap_search($ds, 
$GLOBALS['phpgw_info']['server']['ldap_context'], "uidnumber=$_account_id");
                        $allValues = ldap_get_entries($ds, $sri);
-       
        
                        $entry['userpassword'] = 
$GLOBALS['phpgw']->common->encrypt_password($new_passwd);
--- 89,92 ----

Index: class.common.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.common.inc.php,v
retrieving revision 1.123.2.9.2.6
retrieving revision 1.123.2.9.2.7
diff -C2 -r1.123.2.9.2.6 -r1.123.2.9.2.7
*** class.common.inc.php        4 May 2003 15:11:02 -0000       1.123.2.9.2.6
--- class.common.inc.php        5 May 2003 06:29:06 -0000       1.123.2.9.2.7
***************
*** 1161,1175 ****
                function encrypt_password($password)
                {
!                       if 
($GLOBALS['phpgw_info']['server']['ldap_encryption_type'] == 'DES')
                        {
                                $salt       = $this->randomstring(2);
                                $e_password = $this->des_cryptpasswd($password, 
$salt);
                        }
!                       if 
($GLOBALS['phpgw_info']['server']['ldap_encryption_type'] == 'MD5')
                        {
                                $salt       = $this->randomstring(8);
                                $e_password = $this->md5_cryptpasswd($password, 
$salt);
                        }
!                       return $e_password;
                }
  
--- 1161,1180 ----
                function encrypt_password($password)
                {
!                       if 
(strtolower($GLOBALS['phpgw_info']['server']['ldap_encryption_type']) == 'des')
                        {
                                $salt       = $this->randomstring(2);
                                $e_password = $this->des_cryptpasswd($password, 
$salt);
+                               
+                               return $_epassword;
                        }
!                       elseif 
(strtolower($GLOBALS['phpgw_info']['server']['ldap_encryption_type']) == 'md5')
                        {
                                $salt       = $this->randomstring(8);
                                $e_password = $this->md5_cryptpasswd($password, 
$salt);
+                               
+                               return $e_password;
                        }
!                       
!                       return false;
                }
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]