--- a/lib/PageRender.php +++ b/lib/PageRender.php @@ -287,7 +287,7 @@ break; default: - $vals[$i] = password_hash($passwordvalue,$enc); + $vals[$i] = password_hash_custom($passwordvalue,$enc); } $vals = array_unique($vals); @@ -957,7 +957,7 @@ if (trim($val)) $enc_type = get_enc_type($val); else - $enc_type = $server->getValue('appearance','password_hash'); + $enc_type = $server->getValue('appearance','password_hash_custom'); $obfuscate_password = obfuscate_password_display($enc_type); @@ -982,7 +982,7 @@ if (trim($val)) $enc_type = get_enc_type($val); else - $enc_type = $server->getValue('appearance','password_hash'); + $enc_type = $server->getValue('appearance','password_hash_custom'); echo '
'; --- a/lib/ds_ldap_pla.php +++ b/lib/ds_ldap_pla.php @@ -16,7 +16,7 @@ function __construct($index) { parent::__construct($index); - $this->default->appearance['password_hash'] = array( + $this->default->appearance['password_hash_custom'] = array( 'desc'=>'Default HASH to use for passwords', 'default'=>'md5'); --- a/lib/functions.php +++ b/lib/functions.php @@ -2127,7 +2127,7 @@ * crypt, ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, sha512, or clear. * @return string The hashed password. */ -function password_hash($password_clear,$enc_type) { +function password_hash_custom($password_clear,$enc_type) { if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS')) debug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs); @@ -2318,7 +2318,7 @@ # SHA crypted passwords case 'sha': - if (strcasecmp(password_hash($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0) + if (strcasecmp(password_hash_custom($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0) return true; else return false; @@ -2327,7 +2327,7 @@ # MD5 crypted passwords case 'md5': - if( strcasecmp(password_hash($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0) + if( strcasecmp(password_hash_custom($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0) return true; else return false; @@ -2392,7 +2392,7 @@ # SHA512 crypted passwords case 'sha512': - if (strcasecmp(password_hash($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0) + if (strcasecmp(password_hash_custom($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0) return true; else return false;