From 87b6b050c941c563c8638d4863bd7fe3f0d19429 Mon Sep 17 00:00:00 2001 From: Joshua Thomas Przyborowski Date: Wed, 13 Dec 2017 19:13:02 -0600 Subject: [PATCH] Update sql.php --- sql.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sql.php b/sql.php index 6c39a77..f0960c7 100644 --- a/sql.php +++ b/sql.php @@ -191,15 +191,13 @@ require_once($SettDir['misc'].'utf8.php'); require_once($SettDir['inc'].'filename.php'); if(!isset($Settings['use_hashtype'])) { $Settings['use_hashtype'] = "sha1"; } -if(!function_exists('hash')||!function_exists('hash_algos')||!function_exists('password_hash')) { +if(!function_exists('hash')||!function_exists('hash_algos')) { if($Settings['use_hashtype']!="md5"&& - $Settings['use_hashtype']!="sha1") { + $Settings['use_hashtype']!="sha1"&& + $Settings['use_hashtype']!="bcrypt") { $Settings['use_hashtype'] = "sha1"; } } -if(function_exists('hash')&&function_exists('hash_algos')&&$Settings['use_hashtype']!="bcrypt") { -if(!in_array($Settings['use_hashtype'],hash_algos())) { - $Settings['use_hashtype'] = "sha1"; } -if(function_exists('password_hash')&&$Settings['use_hashtype']=="bcrypt") { -if(!in_array($Settings['use_hashtype'],hash_algos())) { +if((function_exists('hash')&&function_exists('hash_algos'))||function_exists('password_hash')) { +if(!in_array($Settings['use_hashtype'],hash_algos())&&$Settings['use_hashtype']!="bcrypt") { $Settings['use_hashtype'] = "sha1"; } if($Settings['use_hashtype']!="md2"&& $Settings['use_hashtype']!="md4"&& -- 2.11.0