Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing password causes SCRAM auth to give confusing and unhelpful error message #2288

Closed
sehrope opened this issue Oct 8, 2021 · 0 comments · Fixed by #2290
Closed

Missing password causes SCRAM auth to give confusing and unhelpful error message #2288

sehrope opened this issue Oct 8, 2021 · 0 comments · Fixed by #2290

Comments

@sehrope
Copy link
Member

sehrope commented Oct 8, 2021

If the server requests SCRAM authentication but the user has not supplied one, the current code throws an internal error as we try to cast the null password value to a not-null one for use in the SCRAM handshake.

We need to add a check similar to the MD5 one to ensure that the user has actually supplied a password.

Originally reported on the postgresql-jdbc mailing list:

https://www.postgresql.org/message-id/flat/CAHsP%3D4_aCd13LMCgZnaeN_%2B3BxkM9etU5HZ3%3Dt5UV36h73cHkg%40mail.gmail.com#c83ef9c8d5d9f2d961a2a84746f2cc53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant