Skip to content

Commit

Permalink
FIX better check
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Feb 13, 2020
1 parent 275b5d1 commit f19f706
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/core/lib/security.lib.php
Expand Up @@ -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));
Expand Down

0 comments on commit f19f706

Please sign in to comment.