Skip to content

Remove sha1 pre-hashing from password handling#6460

Merged
gharlan merged 4 commits into6.xfrom
remove-password-pre-hashing
Apr 7, 2026
Merged

Remove sha1 pre-hashing from password handling#6460
gharlan merged 4 commits into6.xfrom
remove-password-pre-hashing

Conversation

@gharlan
Copy link
Copy Markdown
Member

@gharlan gharlan commented Apr 7, 2026

Previously, passwords were sha1-hashed before being passed to
password_hash/password_verify (a leftover from client-side hashing
in REDAXO 5.x). This removes the sha1 layer entirely:

  • Remove $isPreHashed parameter from setLogin, passwordHash,
    passwordVerify
  • Remove client-side sha1 hashing from login form and sha1.js asset
  • Add legacy fallback in BackendLogin::passwordVerify for old
    sha1-wrapped password hashes, with automatic rehashing on next login
  • Use static:: instead of self:: for passwordVerify in
    Login::checkLogin to enable late static binding

closes #2127

Previously, passwords were sha1-hashed before being passed to
password_hash/password_verify (a leftover from client-side hashing
in REDAXO 5.x). This removes the sha1 layer entirely:

- Remove `$isPreHashed` parameter from `setLogin`, `passwordHash`,
  `passwordVerify`
- Remove client-side sha1 hashing from login form and `sha1.js` asset
- Add legacy fallback in `BackendLogin::passwordVerify` for old
  sha1-wrapped password hashes, with automatic rehashing on next login
- Use `static::` instead of `self::` for `passwordVerify` in
  `Login::checkLogin` to enable late static binding

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gharlan gharlan added this to the REDAXO 6.0 milestone Apr 7, 2026
@gharlan gharlan force-pushed the remove-password-pre-hashing branch from 451b756 to 8c13d9c Compare April 7, 2026 21:41
@gharlan gharlan force-pushed the remove-password-pre-hashing branch from 3e705ae to fc7c918 Compare April 7, 2026 22:00
@gharlan gharlan merged commit a9644fe into 6.x Apr 7, 2026
15 checks passed
@gharlan gharlan deleted the remove-password-pre-hashing branch April 7, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant