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

Add informative SASL empty password error message #2899

Closed

Conversation

sehrope
Copy link
Contributor

@sehrope sehrope commented Jan 19, 2023

First commit adds a test for non-string password values being used for SASL authentication. The main code already throws an error for it but it wasn't tested anywhere.

Second commit adds a new error message when SASL authentication is requested by the server but the password is a zero-length string. This would already be a failure situation as you cannot have a zero-length password with SASL auth. This commit just changes it so the user gets an error of: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a non-empty string. Also adds a unit test for it.

I didn't merge the two checks and error messages as they're more informative for the end user separately.

Addresses and somewhat closes #2757.

@sehrope sehrope force-pushed the fix-sasl-empty-password-error-message branch from 7898723 to 49432be Compare January 20, 2023 14:54
@charmander
Copy link
Collaborator

Looks good, but I don’t understand how it can help with #2757. Anyone who’s hitting that error message won’t hit this one, right?

@sehrope
Copy link
Contributor Author

sehrope commented Jan 23, 2023

@charmander As usual, you're right :D

Studying this a bit more I realized the SASL integration tests weren't even being run in CI. I've created a new PR, #2901, that fixes that and all this too. Closing this out in favor of that newer PR.

@sehrope sehrope closed this Jan 23, 2023
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 this pull request may close these issues.

Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string
2 participants