forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit344a113
committed
Don't use SCRAM-specific "e=invalid-proof" on invalid password.
Instead, send the same FATAL message as with other password-basedauthentication mechanisms. This gives a more user-friendly message:psql: FATAL: password authentication failed for user "test"instead of:psql: error received from server in SASL exchange: invalid-proofEven before this patch, the server sent that FATAL message, after theSCRAM-specific "e=invalid-proof" message. But libpq would stop at theSCRAM error message, and not process the ErrorResponse that would comeafter that. We could've taught libpq to check for an ErrorResponse afterfailed authentication, but it's simpler to modify the server to send onlythe ErrorResponse. The SCRAM specification allows for aborting theauthentication at any point, using an application-defined error mechanism,like PostgreSQL's ErrorResponse. Using the e=invalid-proof message isoptional.Reported by Jeff Janes.Discussion:https://www.postgresql.org/message-id/CAMkU%3D1w3jQ53M1OeNfN8Cxd9O%2BA_9VONJivTbYoYRRdRsLT6vA@mail.gmail.com1 parent44c5288 commit344a113
1 file changed
+7
-8
lines changedLines changed: 7 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
343 | 343 |
| |
344 | 344 |
| |
345 | 345 |
| |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
346 | 353 |
| |
347 | 354 |
| |
348 | 355 |
| |
349 | 356 |
| |
350 | 357 |
| |
351 | 358 |
| |
352 | 359 |
| |
353 |
| - | |
354 |
| - | |
355 |
| - | |
356 |
| - | |
357 |
| - | |
358 |
| - | |
359 |
| - | |
360 |
| - | |
361 | 360 |
| |
362 | 361 |
| |
363 | 362 |
| |
|
0 commit comments
Comments
(0)