From: searchadm <sea...@go...> - 2004-10-28 15:26:26
|
Hallo, i try to change userauth to verify users against the user database of SMF (board software). problem is, they use md5 and crypt to store the passwords. Their login code looks like following: if ($user_settings['passwd'] == crypt($_REQUEST['passwrd'], substr($_REQUEST['passwrd'], 0, 2)) || $user_settings['passwd'] == md5($_REQUEST['passwrd'])) { updateMemberData($user_settings['ID_MEMBER'], array('passwd' => '\'' . $md5_passwrd . '\'')); $user_settings['passwd'] = $md5_passwrd; } // What about if the user has come from vBulletin or Invision? Let's welcome them with open arms \o/. elseif ($user_settings['passwordSalt'] != '' && ($user_settings['passwd'] == md5(md5($_REQUEST['passwrd']) . $user_settings['passwordSalt']) || $user_settings['passwd'] == md5(md5($user_settings['passwordSalt']) . md5($_REQUEST['passwrd'])))) { // Get our new encryption in! updateMemberData($user_settings['ID_MEMBER'], array('passwd' => '\'' . $md5_passwrd . '\'', 'passwordSalt' => '\'\'')); $user_settings['passwd'] = $md5_passwrd; } ist it possible to use it in phpwiki also? Regards Stefan |