forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit14f2f9e
committed
Add CHECK_FOR_INTERRUPTS() in scram_SaltedPassword() for the backend
scram_SaltedPassword() could take a long time to compute when the numberof iterations used is large enough, and this code uses a tight loop tocompute a salted password.Note that the same issue exists in libpq when using \password and alarge iteration number, but this cannot be interrupted. A CFI in thebackend is useful for server-side computations, at least.Backpatch down to 16, where the user-settable GUC scram_iterations hasbeen added.Author: Bowen ShiReviewed-by: Aleksander Alekseev, Daniel GustafssonDiscussion:https://postgr.es/m/CAM_vCueV6xfr08KczfaCEk5J_qeTZtgqN7+orkNLx=g+phE82Q@mail.gmail.comBackpatch-through: 161 parent930d2b4 commit14f2f9e
1 file changed
+11
-0
lines changedLines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| 25 | + | |
| 26 | + | |
| 27 | + | |
25 | 28 |
| |
26 | 29 |
| |
27 | 30 |
| |
| |||
73 | 76 |
| |
74 | 77 |
| |
75 | 78 |
| |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
76 | 87 |
| |
77 | 88 |
| |
78 | 89 |
| |
|
0 commit comments
Comments
(0)