User tests: Successful: Unsuccessful:
PHP 7.2 introduces support for a new native password hashing algorithm based on Argon2 (see https://wiki.php.net/rfc/argon2_password_hash for the relevant RFC). Since the native password API now supports multiple algorithms, the use of PASSWORD_DEFAULT
is a little more flaky since conceivably one day PHP core could change this to point to a different hash. Therefore, this PR does a few things.
PASSWORD_DEFAULT
uses to the explicit PASSWORD_BCRYPT
constant insteadJoomla\CMS\User\UserHelper::verifyPassword()
a little more strictJoomla\CMS\User\UserHelper::verifyPassword()
to detect Argon2 passwords and attempt to validate them (officially, we aren't going to advertise this as a supported password hash and no part of the core API will support generating Argon2 hashes, BUT, if someone running PHP 7.2 chooses to compile it with support for the hash and implement some handling to put Argon2 hashes in their database, we can validate it since the native PHP API will handle it)Generating password hashes still results in a valid bcrypt hash, users can still authenticate correctly.
Category | ⇒ | Libraries |
Status | New | ⇒ | Pending |
I don't think it'll be necessary. Looking at the C code for password_verify()
in PHP 5.5 (where it was first introduced) and 7.2, and Anthony's polyfill, it all pushes into the crypt()
PHP function (and uses a C level function for the heavy lifting) and that looks like will fail out if it doesn't recognize the salt.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-08-23 13:27:47 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Given we aren't doing polyfills should we add a version check on the verify method?