From 2ed81ef9bede6efe3f39eca7cdfe4d735595b109 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Sat, 8 May 2021 23:08:05 +0300 Subject: [PATCH] fix --- application/Espo/Core/Utils/Crypt.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/Espo/Core/Utils/Crypt.php b/application/Espo/Core/Utils/Crypt.php index c4738543f2..075e598af4 100644 --- a/application/Espo/Core/Utils/Crypt.php +++ b/application/Espo/Core/Utils/Crypt.php @@ -98,11 +98,11 @@ class Crypt public function decrypt(string $encryptedString): string { - $encryptedString = base64_decode($encryptedString); + $encryptedStringDecoded = base64_decode($encryptedString); - $string = substr($encryptedString, 0, strlen($encryptedString) - 16); + $string = substr($encryptedStringDecoded, 0, strlen($encryptedStringDecoded) - 16); - $iv = substr($encryptedString, -16); + $iv = substr($encryptedStringDecoded, -16); if (extension_loaded('openssl')) { return trim(