phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] api/auth/class.auth_sql.php, 1.1.1.1.2.10


From: nomail
Subject: [Phpgroupware-cvs] api/auth/class.auth_sql.php, 1.1.1.1.2.10
Date: Tue, 22 Jun 2004 23:51:54 +0200

Update of /api/auth
Modified Files:
        Branch: proposal-branch
          class.auth_sql.php

date: 2004/06/22 21:51:54;  author: jengo;  state: Exp;  lines: +4 -9

Log Message:
- Fixed _verify_password(), now works correctly with crypt()
- Changing your password now updates your last password change in the accounts 
table, subject to change.  This _might_ be stored in the profile data
=====================================================================
Index: api/auth/class.auth_sql.php
diff -u api/auth/class.auth_sql.php:1.1.1.1.2.9 
api/auth/class.auth_sql.php:1.1.1.1.2.10
--- api/auth/class.auth_sql.php:1.1.1.1.2.9     Thu Jun 10 07:07:36 2004
+++ api/auth/class.auth_sql.php Tue Jun 22 21:51:54 2004
@@ -79,13 +79,7 @@
                                        }
                                        break;
                                case 'CRYPT':
-                                       // FIXME: This isn't working, I can't 
figure out why
-                                       //        Even if I pass crypt() the 
correct salt
-                                       //        It returns a different hash
-                                       
ereg('\$([1-2]{1})\$(.*)\$(.*)',$h_passwd,$matches);
-                                       list(,$_type,$salt,$original_hash) = 
$matches;
-
-                                       if (crypt($u_passwd,$salt) == 
$original_hash)
+                                       if (crypt($u_passwd,$h_passwd) == 
$h_passwd)
                                        {
                                                return true;
                                        }
@@ -154,7 +148,8 @@
                                        UPDATE
                                                phpgw_accounts
                                        SET
-                                               account_pwd='" . 
$this->_create_password($args['new_passwd']) . "'
+                                               account_pwd='" . 
$this->_create_password($args['new_passwd']) . "',
+                                               account_lastpwd_change=now()
                                        WHERE
                                                account_id='" . 
$args['account_id'] . "'
                        ");




reply via email to

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