From f19f706c386e8dc4f123bea2b6e9453eeccb29d6 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 13 Feb 2020 07:55:52 +0100 Subject: [PATCH] FIX better check --- htdocs/core/lib/security.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index dc739220c07e8..483567aa3d048 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -122,7 +122,7 @@ function dol_hash($chain, $type = '0') } // Salt value - if (! empty($conf->global->MAIN_SECURITY_SALT) && ( ! $type == '4' || ! $type == 'md5openldap')) $chain=$conf->global->MAIN_SECURITY_SALT.$chain; + if (! empty($conf->global->MAIN_SECURITY_SALT) && ($type !== '4' || $type !== 'md5openldap')) $chain = $conf->global->MAIN_SECURITY_SALT.$chain; if ($type == '1' || $type == 'sha1') return sha1($chain); elseif ($type == '2' || $type == 'sha1md5') return sha1(md5($chain));