From 0be9f81b9353d6e38be59acf57e181da54032217 Mon Sep 17 00:00:00 2001 From: Akshay Jain <30288355+wr3nch0x1@users.noreply.github.com> Date: Tue, 29 Jun 2021 10:10:13 -0400 Subject: [PATCH] fixed , OPENSSL_NO_PADDING (#2135) * Fixed Security issue Fixed Insecure randomness vulnerability * Update BaseClient.php --- src/MicroMerchant/Kernel/BaseClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MicroMerchant/Kernel/BaseClient.php b/src/MicroMerchant/Kernel/BaseClient.php index d91b4677f..6f4954209 100644 --- a/src/MicroMerchant/Kernel/BaseClient.php +++ b/src/MicroMerchant/Kernel/BaseClient.php @@ -204,7 +204,7 @@ protected function encryptSensitiveInformation(string $string) $encrypted = ''; $publicKeyResource = openssl_get_publickey($certificates); - $f = openssl_public_encrypt($string, $encrypted, $publicKeyResource); + $f = openssl_public_encrypt($string, $encrypted, $publicKeyResource, OPENSSL_NO_PADDING); openssl_free_key($publicKeyResource); if ($f) { return base64_encode($encrypted);