Jump to content

Updating from PS 1.6 Md5 Encryption To Hash 1.7


jesuscz

Recommended Posts

Hi all!

is the first time I write in the community, although I read you a lot and is very useful. I have a problem, I am uptating my PS 1.6 to 1.7. I know PS 1.6 uses this encryption methond md5(_COOKIE_KEY_.$passwd) but we converted it to md5($passwd) previusly for having compatibility with our previus shop not-prestashop. 

Now we want to update to 1.7 and we see that the encryption method has changed to hash(). We have achieved to log in previus users changing this function: getByEmail(), but now we want the register to work well ( saving the password as md5($plaintextpassword) ). We know that the new encyption method is much more secure and is not recommedned to use md5($plaintextpassword) but now we cannot change that.

We have changed in Classes/Customer.php all lines from:
//$this->passwd = $crypto->hash($password);
to:
$this->passwd = md5($password);

But with all this changes when we register a new user, its saved as the hash() method in this format $2y$10$VPm9ygay2ldd0Vu0J4ttQuOdD/mIytURV/nXCXKs4GcB4AkIWtaQm instead of this: bcef5cffa6f4bb0abb94cf6fa7a7cb2f. I dont find where I have to change t save in the desired format? Please is very urgent, we are now struggling with this 1 week....

Any help is appreciated, thanks a lot.

Jesús.

       

Edited by jesuscz (see edit history)
Link to comment
Share on other sites

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
×
×
  • Create New...