From 5237c89089f869c92b2867821be12ee45a09fa57 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Sep 2022 15:50:27 +0200 Subject: [PATCH] Fix dolDecrypt/dolEncrypt --- htdocs/core/lib/security.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 1c0d7d1aab1..0d0a0de3e0d 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -120,7 +120,7 @@ function dolEncrypt($chain, $key = '', $ciphering = "AES-256-CTR") { global $dolibarr_main_instance_unique_id; - if ($chain === '') { + if ($chain === '' || is_null($chain)) { return ''; } @@ -166,7 +166,7 @@ function dolDecrypt($chain, $key = '') { global $dolibarr_main_instance_unique_id; - if ($chain === '') { + if ($chain === '' || is_null($chain)) { return ''; }