Repository navigation
Commit 3207cd6
committed
db: compare password hashes in constant time
CheckPassword compared the derived hash against the stored one with
a plain string comparison, whose timing depends on how many leading
bytes match. Use a constant-time comparison to avoid leaking that
information.
Signed-off-by: Robin Jarry <robin@jarry.cc>1 parent 8f017f0 commit 3207cd6
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
| 60 | + | |
60 | 61 | | |
0 commit comments