You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the validatePhpseclib() method in /Creativestyle/AmazonCheckout/Model/Debug.php is incompatible with the latest phpseclib3 version installed via Composer.
Current Code (Line 285) :
public function validatePhpseclib()
{
try {
if (class_exists('Crypt_RSA', false)) {
$rsa = new Crypt_RSA();
} elseif (class_exists('\phpseclib\Crypt\RSA', true)) {
$rsa = new \phpseclib\Crypt\RSA();
} else {
return false;
}
$rsa->setHash(AmazonPayV2_Client::HASH_ALGORITHM);
$rsa->setMGFHash(AmazonPayV2_Client::HASH_ALGORITHM);
$rsa->setSaltLength(20);
$rsa->loadKey($this->_getDummyPrivateKey());
if (empty($rsa->modulus) || empty($rsa->exponent)) {
return false;
}
} catch (Exception $e) {
return false;
}
return true;
}
Issue:
Instantiating the RSA class directly results in a fatal error since the class is abstract in phpseclib3.
Hello,
I noticed that the validatePhpseclib() method in /Creativestyle/AmazonCheckout/Model/Debug.php is incompatible with the latest phpseclib3 version installed via Composer.
Current Code (Line 285) :
Issue:
Instantiating the RSA class directly results in a fatal error since the class is abstract in phpseclib3.
Suggested Fix:
This update simplifies the validation and ensures compatibility with the newer phpseclib3.
Thank you for considering this change!
The text was updated successfully, but these errors were encountered: