MyBB Community Forums

Full Version: salt_password() apparently does nothing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm attempting to move one of my boards from 1.6 to 1.8. On the board, I've modified the salt_password function so that it looks like this:
function salt_password($password, $salt)
{
    //      return md5(md5($salt).$password);
    return md5(md5($salt).$password."random_string_here");
}


This seems to work perfectly fine on the 1.6 board, but on the 1.8 board it seems to be ignoring the function completely. It doesn't even do anything when I throw a die() in the function like this:
function salt_password($password, $salt)
{
    //      return md5(md5($salt).$password);
    die("is this thing even on?");
    return md5(md5($salt).$password."random_string_here");
}

It has me baffled.

Unsure if there's a new function somewhere and the deprecated code has been left in there, or if magic code.

This should probably be moved to 1.8.

Thanks ninja-mod. :^)
salt_password ist still used however logins are now handled by a datahandler (/inc/datahandlers/login.php).
(2015-03-22, 09:35 AM)StefanT Wrote: [ -> ]salt_password ist still used however logins are now handled by a datahandler (/inc/datahandlers/login.php).

Ya, just found it myself by grepping for md5 and was about to mark this as resolved. Thanks for your answer.

Is there any reason that the datahandler doesn't use the already existing function? Seems a little odd to have duplicate code.
The function should actually call the datahandler IMO. It is supposed to be deprecated.