Jump to content

IPS connect not matching password


freudo

Recommended Posts

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 by barikat
Link to comment
  • Moderators
  On 20/06/2020 at 08:53, Master_MTA said:

just use md5 instead this type of hashing +_+

Expand  

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)

 

  • Like 1
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...