Repository navigation
Commit bf1b5c7
Store changed passwords as typed and report the real save result
chpwd.php passed the old and new passwords through the database escape
function before validating and hashing them. They never reach SQL as
text, so a password containing ' or \ was stored with extra backslashes
and could not be used to log in. It also trimmed them, unlike the login
form. The passwords are now read the same way index.php reads the login
password.
The result branches were also inverted in effect: a failed save showed
"Your password has been updated", and a successful one only closed the
window (which does nothing when the page was not opened as a popup). A
success now shows the message before closing; a failure shows the save
errors.
Refs #386
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016CP89WVmGZ1VVCCZMS6ntN1 parent b8fdfd0 commit bf1b5c7
1 file changed
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
| 35 | + | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
| |||
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | | - | |
39 | | - | |
40 | | - | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
0 commit comments