Skip to content

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

Merged
bgrainger merged 1 commit into
mysql-net:masterfrom
kobake:check-authentication-method-switch-payload-length
Aug 26, 2017
Merged

Check length of auth method switch payload for detecting old protocol.#316
bgrainger merged 1 commit into
mysql-net:masterfrom
kobake:check-authentication-method-switch-payload-length

Conversation

@kobake

@kobake kobake commented Aug 26, 2017

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

Thanks for the contribution!

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

kobake commented Aug 26, 2017

Copy link
Copy Markdown
Contributor Author

😄

@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.

2 participants