20.10.2013, 14:53
MyBB code:
As you can see, $md5pass, which contains a MD5 hash, gets passed to the function salt_password.
So there's your mistake.
PHP код:
function generate_salt()
{
return random_str(8);
}
function salt_password($password, $salt)
{
return md5(md5($salt).$password);
}
$pass = $mybb->input['password'];
$md5pass = md5($pass);
$salt = generate_salt();
$salted_pass = salt_password($md5pass, $salt);
So there's your mistake.