[geeklog-cvs] Geeklog-1.x/public_html usersettings.php, 1.178, 1.179

Michael Jervis mjervis at qs1489.pair.com
Mon Sep 15 14:29:42 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/public_html
In directory qs1489.pair.com:/tmp/cvs-serv94076/public_html

Modified Files:
	usersettings.php 
Log Message:
Fix for bug #0000724 - attempting to change your password when your email address is 'invalid' causes password change but failed to make changes message.


It's a real shame that someone else will allege copyright ownership for this work.

Index: usersettings.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/usersettings.php,v
retrieving revision 1.178
retrieving revision 1.179
diff -C2 -d -r1.178 -r1.179
*** usersettings.php	14 Sep 2008 17:13:35 -0000	1.178
--- usersettings.php	15 Sep 2008 18:29:39 -0000	1.179
***************
*** 932,958 ****
      }
  
-     if (!empty($A['passwd'])) {
-         if (($A['passwd'] == $A['passwd_conf']) &&
-                 (SEC_encryptPassword($A['old_passwd']) == $_USER['passwd'])) {
-             $passwd = SEC_encryptPassword($A['passwd']);
-             DB_change($_TABLES['users'], 'passwd', "$passwd",
-                       "uid", $_USER['uid']);
-             if ($A['cooktime'] > 0) {
-                 $cooktime = $A['cooktime'];
-             } else {
-                 $cooktime = -1000;
-             }
-             setcookie($_CONF['cookie_password'], $passwd, time() + $cooktime,
-                       $_CONF['cookie_path'], $_CONF['cookiedomain'],
-                       $_CONF['cookiesecure']);
-         } elseif (SEC_encryptPassword($A['old_passwd']) != $_USER['passwd']) {
-             return COM_refresh ($_CONF['site_url']
-                                 . '/usersettings.php?msg=68');
-         } elseif ($A['passwd'] != $A['passwd_conf']) {
-             return COM_refresh ($_CONF['site_url']
-                                 . '/usersettings.php?msg=67');
-         }
-     }
- 
      // a quick spam check with the unfiltered field contents
      $profile = '<h1>' . $LANG04[1] . ' ' . $_USER['username'] . '</h1>'
--- 932,935 ----
***************
*** 986,989 ****
--- 963,990 ----
                  . '/usersettings.php?msg=56');
      } else {
+         
+         if (!empty($A['passwd'])) {
+             if (($A['passwd'] == $A['passwd_conf']) &&
+                     (SEC_encryptPassword($A['old_passwd']) == $_USER['passwd'])) {
+                 $passwd = SEC_encryptPassword($A['passwd']);
+                 DB_change($_TABLES['users'], 'passwd', "$passwd",
+                           "uid", $_USER['uid']);
+                 if ($A['cooktime'] > 0) {
+                     $cooktime = $A['cooktime'];
+                 } else {
+                     $cooktime = -1000;
+                 }
+                 setcookie($_CONF['cookie_password'], $passwd, time() + $cooktime,
+                           $_CONF['cookie_path'], $_CONF['cookiedomain'],
+                           $_CONF['cookiesecure']);
+             } elseif (SEC_encryptPassword($A['old_passwd']) != $_USER['passwd']) {
+                 return COM_refresh ($_CONF['site_url']
+                                     . '/usersettings.php?msg=68');
+             } elseif ($A['passwd'] != $A['passwd_conf']) {
+                 return COM_refresh ($_CONF['site_url']
+                                     . '/usersettings.php?msg=67');
+             }
+         }
+         
          if ($_US_VERBOSE) {
              COM_errorLog('cooktime = ' . $A['cooktime'],1);




More information about the geeklog-cvs mailing list