Repository navigation
Commit b8fdfd0
Stop re-hashing the stored password when a user is saved again
CUser::hook_preUpdate() decided whether the password had changed by
comparing the stored hash with a fresh password_hash() of the current
value. Because password_hash() salts randomly they never matched, so any
code path that loads a user and stores it again (without touching the
password) hashed the existing hash and locked the user out. The LDAP
authenticator does this on every login.
Keep the stored hash when the value is empty or still equal to the stored
hash, and hash it only when it is a new plain-text password.
Refs #386
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016CP89WVmGZ1VVCCZMS6ntN1 parent 5b662e5 commit b8fdfd0
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | | - | |
66 | | - | |
67 | 70 | | |
68 | | - | |
| 71 | + | |
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
| |||
0 commit comments