gigya / drupal8

Gigya Drupal 9/10 GConnector
GNU General Public License v2.0
4 stars 15 forks source link

refactor(gigyaapihelper): openssl_encrypt() #4 parameter deprecation #121

Closed imsoka closed 1 year ago

imsoka commented 1 year ago

Hi all,

Since PHP 8.1 has been released. Changing Gigya keys throws a deprecation error on openssl_encrypt. The issue is that currently we are passing a null value in the 4th parameter of openssl_encrypt and it requires an int value,

This pull request aims to fix this. Im declaring the arguments of openssl_encrypt() in an named array, and passing the array to openssl_encrypt, this allows to not care about the order of the parameters, we have to do this because the parameter $options, comes before $iv, but we don't have a value for it.

Thank you, and sorry for my bad English.

Ynhockey commented 1 year ago

Hi, thanks for the contrib! Can you please reroute it to the develop branch? Also: Upcoming versions of the module, at least until June 2023, will continue to support PHP 7, so if possible, can you please make it PHP 7-compliant? Thanks.

imsoka commented 1 year ago

0a75d00

should be PHP 7 compliant, this is not really a solution since we are passing the 0 value as a hardcoded one, but until PHP 8 we cannot do it in other way.

When you are considering the upgrade, please take a look at this pull request again and apply it if you consider doing it.

Thanks!