Use renamed 'hash_password' function, instead of 'password_hash'
The original function was 'password_hash', but a function with the same name was added to core PHP, and rather than debugging integration with the new native function, this preserves the application's original function with less fuss.
This commit is contained in:
parent
c985215714
commit
58970e1c33
@ -287,7 +287,7 @@ class PageRender extends Visitor {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$vals[$i] = password_hash($passwordvalue,$enc);
|
$vals[$i] = hash_password($passwordvalue,$enc);
|
||||||
}
|
}
|
||||||
|
|
||||||
$vals = array_unique($vals);
|
$vals = array_unique($vals);
|
||||||
|
@ -2388,7 +2388,7 @@ function password_check($cryptedpassword,$plainpassword,$attribute='userpassword
|
|||||||
|
|
||||||
# SHA crypted passwords
|
# SHA crypted passwords
|
||||||
case 'sha':
|
case 'sha':
|
||||||
if (strcasecmp(password_hash($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0)
|
if (strcasecmp(hash_password($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
@ -2397,7 +2397,7 @@ function password_check($cryptedpassword,$plainpassword,$attribute='userpassword
|
|||||||
|
|
||||||
# MD5 crypted passwords
|
# MD5 crypted passwords
|
||||||
case 'md5':
|
case 'md5':
|
||||||
if( strcasecmp(password_hash($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0)
|
if( strcasecmp(hash_password($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
@ -2462,7 +2462,7 @@ function password_check($cryptedpassword,$plainpassword,$attribute='userpassword
|
|||||||
|
|
||||||
# SHA512 crypted passwords
|
# SHA512 crypted passwords
|
||||||
case 'sha512':
|
case 'sha512':
|
||||||
if (strcasecmp(password_hash($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0)
|
if (strcasecmp(hash_password($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user