Jump to content

[Solved] Migrating to prestashop with MD5 encrypted passwords


Recommended Posts

I want to migrate an existing shop to prestashop. Because of several reasons I'm doing it more or less manually (writing directly into the DB). In the source shop I got all user passwords encrypted with MD5. I have noticed that prestashop concatenates the unencrypted password with the COOKIE_KEY before encrypting it with MD5. This basically means I'm ***** because of course I don't know the original passwords of my clients. And I don't really want to force all of them to change it.

Any ideas?

I have come up with: Changing the source code to re-encrypt the MD5 password with the Tools::encrypt method. That is, every time a user logs in the password is encrypted with MD5, then it its concatenated and then it is encrypted again with MD5. This would mean I could use the Tools::encrypt method on all my existing passwords and everything would work. Changing the core is always tricky so I would like to avoid it.

Link to comment
Share on other sites

You will have to override some code, no matter what, you could modify the password verification function to include regular MD5 (if the default doesn't work), and upon a successful login, encrypt the password using the PS method.

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...