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

Minor bug fixes for caching_sha2_password auth logic #390

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

fulghum
Copy link

@fulghum fulghum commented Dec 10, 2024

For accounts without passwords, we need to account for the client sending the null byte when the server re-requests the client auth data, and then skip the AuthMoreDataPacket, and CachingSha2FastAuth packets. Otherwise the mysql client errors with "Malformed packet".

handleConnectionError is used to report stats about failed connection attempts, but wasn't being called in the correct spot. The previous spot was over counting failed connection attempts, since it was called as part of the auth renegotiation flow. It has been moved to be called whenever we return an error or exit the function without a successful connection.

Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fulghum fulghum merged commit b00987f into main Dec 11, 2024
4 checks passed
@fulghum fulghum deleted the fulghum/caching_sha2 branch December 11, 2024 02:44
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.

2 participants