From: Lo?c C. <lo...@us...> - 2001-05-16 20:55:41
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs In directory usw-pr-cvs1:/tmp/cvs-serv4506/chat/lib/index_libs Modified Files: index_validation.lib.php3 do_enter_db_work.lib.php3 Log Message: Passwords are no more crypted Index: index_validation.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/index_validation.lib.php3,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** index_validation.lib.php3 2001/04/19 21:05:04 1.9 --- index_validation.lib.php3 2001/05/16 20:55:37 1.10 *************** *** 51,55 **** * the chat * @global string the password entered by this user - * @global string the md5 hash of this password * * @access public --- 51,54 ---- *************** *** 61,65 **** global $dbLink; global $nick, $slashedNick; ! global $password, $pwdHash; $error1 = ''; --- 60,64 ---- global $dbLink; global $nick, $slashedNick; ! global $password; $error1 = ''; *************** *** 105,109 **** if ($error1 == '' && $requireReg) { ! if ($password == '' && $pwdHash == '') $error1 = ($isLoggedIn) ? L_ERR_USR_1 : L_ERR_USR_14; } --- 104,108 ---- if ($error1 == '' && $requireReg) { ! if ($password == '') $error1 = ($isLoggedIn) ? L_ERR_USR_1 : L_ERR_USR_14; } *************** *** 117,121 **** --- 116,123 ---- $isRegNick = (list($regUserPassword, $regNickPerms, $regNickModeratedRooms) = $dbLink->nextRecord()); if ($isRegNick) + { + $regUserPassword = pmcHandleMagicQuotes($regUserPassword, '', 1, 'del'); $regNickModeratedRooms = pmcHandleMagicQuotes($regNickModeratedRooms, '', 1, 'del'); + } $dbLink->cleanResults(); *************** *** 125,146 **** { // Reserved nick but no password submitted -> deny access ! if ($password == '' && $pwdHash == '') { ! $error1 = L_ERR_USR_3; } ! // Validates the password submitted ! else { ! if ($password != '') ! $pwdHash = md5($password); ! if ($pwdHash != $regUserPassword) ! { ! $isRegNick = false; ! $password = ''; ! $pwdHash = ''; ! $regNickPerms = 'user'; ! $regNickModeratedRooms = ''; ! $error1 = L_ERR_USR_4; ! } } } --- 127,143 ---- { // Reserved nick but no password submitted -> deny access ! if ($password == '') { ! $error1 = L_ERR_USR_3; } ! // Validates the password submitted (compare also its md5 hash for ! // compatibility with old releases) ! else if ($regUserPassword != $password && $regUserPassword != md5($password)) { ! $isRegNick = false; ! $password = ''; ! $regNickPerms = 'user'; ! $regNickModeratedRooms = ''; ! $error1 = L_ERR_USR_4; } } Index: do_enter_db_work.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/do_enter_db_work.lib.php3,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** do_enter_db_work.lib.php3 2001/05/05 21:50:14 1.15 --- do_enter_db_work.lib.php3 2001/05/16 20:55:37 1.16 *************** *** 86,93 **** /** ! * Sets the encrypted password and gets the ip off the user */ - if (empty($pwdHash)) - $pwdHash = ($isRegUser) ? md5($password) : ''; if (empty($ip)) include('./' . _CHAT_PATH .'lib/get_ip.lib.' . C_EXTENSION); --- 86,91 ---- /** ! * Gets the ip of the user */ if (empty($ip)) include('./' . _CHAT_PATH .'lib/get_ip.lib.' . C_EXTENSION); *************** *** 271,275 **** $dbSessionVars['jsVersion'] = $jsVersion; $dbSessionVars['nick'] = $nick; ! $dbSessionVars['pwdHash'] = $pwdHash; $dbSessionVars['roomType'] = $roomType; $dbSessionVars['currentRoom'] = $targetRoom; --- 269,273 ---- $dbSessionVars['jsVersion'] = $jsVersion; $dbSessionVars['nick'] = $nick; ! $dbSessionVars['password'] = $password; $dbSessionVars['roomType'] = $roomType; $dbSessionVars['currentRoom'] = $targetRoom; |