#3683 closed defect (bug) (fixed)
phpBB: Support modern password hashes during first login
| Reported by: | johnjamesjacoby | Owned by: | johnjamesjacoby |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.6.18 |
| Component: | API - Importers | Version: | 2.6.17 |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: |
Description
A current support report confirms that phpBB accounts are imported, but users cannot sign in with their existing passwords and must reset them:
This is reproducible with current trunk.
Cause
phpBB::authenticate_pass() only recognizes phpBB 3.0's 34-character phpass hashes and unprefixed MD5 hashes. phpBB 3.1 and later use bcrypt, while newer phpBB versions can use Argon2i or Argon2id. Those hashes fall through to the MD5 comparison, so the first-login upgrade never updates wp_users.user_pass.
Representative bcrypt, Argon2i, and Argon2id hashes all fail the current converter even though PHP verifies them correctly.
Steps to reproduce
- Import a phpBB user whose
user_passwordis a bcrypt or Argon2 hash. - Confirm that the import stores the serialized hash in
_bbp_password, recordsphpBBin_bbp_class, and clears the WordPress password as intended. - Attempt to sign in with the user's valid phpBB password.
Expected
The converter verifies the phpBB hash, replaces the empty WordPress password with a WordPress hash, removes the temporary converter metadata, and allows the login.
Actual
The phpBB hash fails verification, the metadata remains, and authentication fails until the user resets the password.
A patch is prepared that delegates bcrypt and Argon2 verification to password_verify() while preserving the existing phpass and MD5 paths. It includes regression coverage for correct and incorrect bcrypt, Argon2i, and Argon2id passwords and malformed metadata.
Related: #1886.
Support bcrypt and Argon2 phpBB password upgrades on first login.