#3684 closed task (blessed) (fixed)
Converters: Audit imported password upgrades across all platforms
| Reported by: | johnjamesjacoby | Owned by: | johnjamesjacoby |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.6.18 |
| Component: | API - Importers | Version: | 2.6.17 |
| Severity: | normal | Keywords: | has-unit-tests |
| Cc: |
Description
#3683 exposed that importer password verification had drifted from current upstream password formats. Audit every bundled production converter that stores _bbp_password and participates in the first-login upgrade path.
Scope
- Inventory each converter's source platform, supported source versions, password formats, and intentional reset-only behavior.
- Verify current upstream hashing behavior from primary sources. Do not assume that an old converter implementation still covers the platform's current formats.
- Identify converters whose
authenticate_pass()intentionally returns false (currently Mingle, bbPress1, SimplePress5, and Vanilla) and document whether password upgrades can be supported safely. - Keep phpBB 2 database-schema support distinct from phpBB 3's compatibility with accounts migrated from phpBB 2. Canonical bbPress has only bundled a phpBB 3 converter.
Test coverage
Add a shared fixture/test pattern where practical, plus converter-specific cases for:
- correct and incorrect passwords for every supported hash format;
- malformed, missing, oversized, and unsupported serialized password metadata;
- the full
callback_pass()path, including WordPress password replacement, converter metadata cleanup after success, and metadata retention after failure; - username and email login paths;
- whitespace, quotes, slashes, HTML-special characters, and non-ASCII passwords, accounting for each source platform's input normalization;
- source-database configuration no longer being available at first login.
Document any format that cannot be verified safely and confirm that it fails closed with a usable password-reset path. Avoid weakening comparisons or accepting ambiguous legacy formats to make tests pass.
Acceptance criteria
- Every bundled production converter has an explicit supported/unsupported password matrix.
- Automated fixtures cover every supported format and the shared first-login behavior.
- Unsupported formats and reset-only converters are documented.
- Any fixes discovered by the audit are narrow, backwards compatible, and committed with their regression tests.
Change History (64)
#11
@
4 days ago
The shared first-login path also required the source forum database to remain available after an import completed.
bbp_user_maybe_convert_pass() constructs the selected converter so it can call that converter's existing authenticate_pass() method. The converter base constructor initialized both database objects and immediately connected to the source database, even though callback_pass() reads the imported hash and salt from _bbp_password in the WordPress database and does not query the source database.
The source db_connect() call now runs when convert_table() begins an actual source-data conversion. Converter constructors, setup_globals(), password algorithms, the bbp_new_converter() API, and its filter remain unchanged. Actual imports retain the same connection failure error and JSON response.
After a successful import, the source database is therefore no longer required for supported first-login password upgrades. A correct legacy password is replaced with a normal WordPress password hash and _bbp_password plus _bbp_class are removed. An incorrect password fails closed, keeps the empty WordPress password, preserves both metadata values, and does not connect to the source database.
Regression coverage exercises both successful and unsuccessful phpBB-backed first-login attempts and explicitly confirms that neither opens the source database connection.
Focused tests: 2 tests, 8 assertions.
Full suite: 917 tests, 2,187 assertions, 5 skipped, 355 incomplete.
PHPCS and whitespace checks pass.
Committed to branches/2.6 in [7544] and to trunk in [7545]. Documentation: Imported user passwords now explains the first-login upgrade lifecycle and when the source database may be retired.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 7536: