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

Check length of auth method switch payload for detecting old protocol. #316

Conversation

kobake
Copy link
Contributor

@kobake kobake commented Aug 26, 2017

Single 0xfe byte of the payload means it's an Old Authentication Method Switch Request Packet.
See http://imysql.com/mysql-internal-manual/connection-phase-packets.html

When MySqlConnector of current master version received single 0xfe byte response from the server, it throws FormatException("Read past end of buffer looking for NUL.") that doesn't make sense.

This PR provides a message for suggesting to upgrade password hash format in MySQL user record.

Single 0xfe byte of the payload means it's an Old Authentication Method Switch Request Packet.
See http://imysql.com/mysql-internal-manual/connection-phase-packets.html
@kobake kobake force-pushed the check-authentication-method-switch-payload-length branch from 2e5f733 to 8263733 Compare August 26, 2017 11:16
@bgrainger
Copy link
Member

Thanks for the contribution!

@bgrainger bgrainger merged commit 5663b8c into mysql-net:master Aug 26, 2017
@kobake
Copy link
Contributor Author

kobake commented Aug 26, 2017

😄

@kobake kobake deleted the check-authentication-method-switch-payload-length branch August 26, 2017 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants