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

Use correct scrambled password function (issue #29) #30

Conversation

panlinux
Copy link
Contributor

Here is a suggested fix. It will try to use mysql's make_scrambled_password() if it exists, and your own implementation if it doesn't.
To match the headers from mysql, I had to change the implementation to drop the last length argument.
Finally, I also changed hexify to return capital letters, as that is how the hex string is stored on the mysql server when using the PASSWORD() function.

my_make_scrambled_password() is not meant to be a replacement for
the removed make_scrambled_password() function from libmysqlclient.

So look for make_scrambled_password() in the mysql client library
instead of my_make_scrambled_password(). If not found, then
reimplement it, but with the correct name to avoid further confusion
around this.
Use the make_scrambled_password() function as declared in the mysql
headers.
@panlinux panlinux changed the title Use correct scrambled password function Use correct scrambled password function (issue #29) May 16, 2017
@NigelCunningham NigelCunningham merged commit 9f72c84 into NigelCunningham:v0.8.x May 24, 2017
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