freudo Posted June 19, 2020 Share Posted June 19, 2020 (edited) User password and posting password not matching. $username = $input[0]['username']; -- fetcRemote username input ingame $password = $input[0]['password']; -- fetcRemote password input ingame $salt = $member->members_pass_salt; -- getting member pass salt $hash = crypt($password, '$2y$10$' . $salt); if (\IPS\Login::compareHashes($member->members_pass_hash, $hash) === TRUE) { echo "correct"; } else { echo "incorrect"; } result example: - input password = QWEjashjfahsjahsfhjblabalbala - hash password = KAJSFKJAQQWEbalalbal note: not shared completed code Edited June 19, 2020 by barikat Link to comment
Master_MTA Posted June 20, 2020 Share Posted June 20, 2020 just use md5 instead this type of hashing +_+ Link to comment
Moderators Patrick Posted June 20, 2020 Moderators Share Posted June 20, 2020 5 hours ago, Master_MTA said: just use md5 instead this type of hashing +_+ Just don't use MD5, instead of bcrypt.. please. Here is NanoBob's tutorial, how to handle passwords: https://forum.multitheftauto.com/topic/119243-user-authentication-password-handling-and-doing-it-safely/ (Functions in php: password_hash, password_verify) 1 Link to comment
freudo Posted June 20, 2020 Author Share Posted June 20, 2020 thanks, problem is solved. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now