Commit b729e55
committed
fix: normalize recovery code server-side before hash check
Hash::check() compared the raw submitted code against the dash-less
uppercase hash, so the "strip separators + uppercase" contract was
only enforced by the login.js client. Any other consumer submitting
a code exactly as displayed (XXXX-XXXX) would fail verification on
this lockout-critical path. Apply the same normalization in
AbstractMFAChallengeStrategy::verifyRecoveryCode() before Hash::check.1 parent 7fbff84 commit b729e55
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| |||
0 commit comments