Prestashop: Migrate from Blowfish to mcrypt correctly (PrestaShop 1.6)

Created on 5 May 2019  ·  8Comments  ·  Source: PrestaShop/PrestaShop

Describe the bug

Since PrestaShop 1.6.1.20, blowfish encryption is replaced by mcrypt.

On a shop using Blowfish, upgrade doesn't create necessary constants if needed and not udapte configuration

Upgrade environment (please complete the following information):

  • Version you started from: 1.6.0.11
  • Version you upgrade to: 1.6.1.24
  • Way of upgrade: Web
  • Step concerned: Database backup

Displayed log

Notice: Use of undefined constant _RIJNDAEL_KEY_ - assumed '_RIJNDAEL_KEY_' in /classes/Cookie.php on line 79

Notice: Use of undefined constant _RIJNDAEL_IV_ - assumed '_RIJNDAEL_IV_' in /classes/Cookie.php on line 79

Warning: openssl_decrypt(): IV passed is only 7 bytes long, cipher expects an IV of precisely 16 /classes/Rijndael.php on line 91

Expected behavior

On upgrade of Prestashop, we have to check if _RIJNDAEL_KEY_and _RIJNDAEL_IV_ are defined and if not we have to define it in /config/settings.inc.php

See : https://shop.devcustom.net/gen.php

Moreover, we need to update PS_CIPHER_ALGORITHM to value 1 in ps_configuration table to have right information on BO > Advanced Parameters -> Performances

Screenshots
BO > Advanced Parameters -> Performances
tempsnip

Server (please complete the following information):

  • Web Server: Apache
  • PHP Version: 5.6.39
  • Module Version: 4.7.0
1.6.1.x Autoupgrade Bug No change required

Most helpful comment

It depends. Only to upgrade to the latest 1.7, and up to a certain point.

All 8 comments

For the record the offending line has been removed since 1.7.0: https://github.com/PrestaShop/PrestaShop/commit/ea5dcd9a19f55ed2d72d7c6fabe5f8051d30e171

Does the configuration problem exist as well when upgrading all the way to 1.7?

Hello @Matt75 ,

PrestaShop 1.6 has reached end of life and is no longer officially maintained (see announcement).

Maintenance for this version is now being performed exclusively by volunteers on a very limited scope. You can open an issue on its dedicated repository, but please keep in mind that only absolutely critical issues may be acknowledged.

Thank you

@hibatallahAouadni PS 1.6 is indeed EOL and we dont support it anymore 😉 however we support _the process of upgrading from PS 1.6 to PS 1.7_ and this is the topic of this issue 👍

Hello @matks

Version you started from: 1.6.0.11
Version you upgrade to: 1.6.1.24

Well, I saw the upgrade to version is 1.6.1.24 that's why I close it.

Does the configuration problem exist as well when upgrading all the way to 1.7?

And @eternoendless had ask him if he encounter this issue while upgrading to 1.7 and there's no answer since 2019 :confused:
But if you see it's right to reopen it, let's do it :wink:

Thanks!

@hibatallahAouadni you raise a very good topic: do we support the upgrade from one version of PS 1.6 to another ?

I dont have the answer 😅 .

It depends. Only to upgrade to the latest 1.7, and up to a certain point.

It depends. Only to upgrade to the latest 1.7, and up to a certain point.

So... we keep this closed ?

Looks like yes 👍

Was this page helpful?
0 / 5 - 0 ratings