forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit64e43c5
committed
Log a detail message for auth failures due to missing or expired password.
It's worth distinguishing these cases from run-of-the-mill wrong-passwordproblems, since users have been known to waste lots of time pursuing thewrong theory about what's failing. Now, our longstanding policy about howto report authentication failures is that we don't really want to tell the*client* such things, since that might be giving information to a bad guy.But there's nothing wrong with reporting the details to the postmaster log,and indeed the comments in this area of the code contemplate thatinteresting details should be so reported. We just weren't handling theseparticular interesting cases usefully.To fix, add infrastructure allowing subroutines of ClientAuthentication()to return a string to be added to the errdetail_log field of the mainauthentication-failed error report. We might later want to use this toreport other subcases of authentication failure the same way, but for themoment I just dealt with password cases.Per discussion of a patch from Josh Drake, though this is not whathe proposed.1 parentf0d6f20 commit64e43c5
3 files changed
+42
-20
lines changedLines changed: 27 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
41 |
| - | |
| 41 | + | |
42 | 42 |
| |
43 |
| - | |
| 43 | + | |
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
| |||
207 | 207 |
| |
208 | 208 |
| |
209 | 209 |
| |
210 |
| - | |
| 210 | + | |
| 211 | + | |
211 | 212 |
| |
212 | 213 |
| |
213 |
| - | |
| 214 | + | |
214 | 215 |
| |
215 | 216 |
| |
216 | 217 |
| |
| |||
273 | 274 |
| |
274 | 275 |
| |
275 | 276 |
| |
276 |
| - | |
277 |
| - | |
278 |
| - | |
279 |
| - | |
280 |
| - | |
281 |
| - | |
282 |
| - | |
283 |
| - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
284 | 292 |
| |
285 | 293 |
| |
286 | 294 |
| |
| |||
294 | 302 |
| |
295 | 303 |
| |
296 | 304 |
| |
| 305 | + | |
297 | 306 |
| |
298 | 307 |
| |
299 | 308 |
| |
| |||
507 | 516 |
| |
508 | 517 |
| |
509 | 518 |
| |
510 |
| - | |
| 519 | + | |
511 | 520 |
| |
512 | 521 |
| |
513 | 522 |
| |
514 | 523 |
| |
515 |
| - | |
| 524 | + | |
516 | 525 |
| |
517 | 526 |
| |
518 | 527 |
| |
| |||
552 | 561 |
| |
553 | 562 |
| |
554 | 563 |
| |
555 |
| - | |
| 564 | + | |
556 | 565 |
| |
557 | 566 |
| |
558 | 567 |
| |
| |||
680 | 689 |
| |
681 | 690 |
| |
682 | 691 |
| |
| 692 | + | |
683 | 693 |
| |
684 | 694 |
| |
685 |
| - | |
| 695 | + | |
686 | 696 |
| |
687 | 697 |
| |
688 | 698 |
| |
| |||
692 | 702 |
| |
693 | 703 |
| |
694 | 704 |
| |
695 |
| - | |
| 705 | + | |
696 | 706 |
| |
697 | 707 |
| |
698 | 708 |
| |
|
Lines changed: 13 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 |
| |
33 |
| - | |
| 38 | + | |
| 39 | + | |
34 | 40 |
| |
35 | 41 |
| |
36 | 42 |
| |
| |||
58 | 64 |
| |
59 | 65 |
| |
60 | 66 |
| |
| 67 | + | |
| 68 | + | |
61 | 69 |
| |
62 | 70 |
| |
63 | 71 |
| |
| |||
148 | 156 |
| |
149 | 157 |
| |
150 | 158 |
| |
| 159 | + | |
| 160 | + | |
| 161 | + | |
151 | 162 |
| |
| 163 | + | |
152 | 164 |
| |
153 | 165 |
| |
154 | 166 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
19 |
| - | |
| 18 | + | |
| 19 | + | |
20 | 20 |
| |
21 | 21 |
|
0 commit comments
Comments
(0)