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

MySQL handshake auth_plugin_data2 #133

Closed
jdangerx opened this issue Sep 16, 2016 · 1 comment
Closed

MySQL handshake auth_plugin_data2 #133

jdangerx opened this issue Sep 16, 2016 · 1 comment

Comments

@jdangerx
Copy link
Contributor

Hi, I'm using Mariaex to connect to Sphinx Search, which implements the MySQL 4.1 protocol. For the auth_plugin_data2 field of the initial handshake, Sphinx sends a non-NUL terminated string (string.fixlen, as specified here). This causes a pattern match in line 94 of messages.ex:

    auth_plugin_data2 :string #max(13, length_auth_plugin_data - 8), :string

Since we are looking for a NUL terminated string. I see there's a comment there that indicates we want to pull max(13, length_auth_plugin_data - 8) bytes - so maybe you've considered this and then thought better of it. In any case, it looks like we need another pattern match in Mariaex.Coder.match to fully meet the MySQL spec.

@liveforeverx
Copy link
Member

Thanks!

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

No branches or pull requests

2 participants