-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Support for old (< 4.1) passwords #2
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
Comments
Just for reference, I had this issue in a fresh npm install (node v0.2.0 and node-mysql via npm 8/24/10, don't know how to get it's version) on CentOS. Felixge suggested resetting the password using PASSWORD (see #2 below). To rectify I tried the following:
|
Additionally, my issue is verified related as removal the user's password successfully connected. |
It looks like all of the oldAuth code linked to above has been removed. If I wanted to implement this, where did you intend it to go? |
iamcal: There is a branch called oldpw, see: http://github.com/felixge/node-mysql/tree/oldpw It's not rebased with master right now, but the code in question shouldn't cause any conflicts. It'd be really awesome if you could help me with this, let me know if I can provide any help for you. |
I've gotten hashPassword(), initRandom(), myRnd() and scamble323() all working in this branch: http://github.com/iamcal/node-mysql/tree/oldpw The implementation of hashPassword() is buggy on your oldpw branch, so that's been rewritten. There are a bunch of tests for all the new functions that use the output from tests/fixture/libmysql_password.c as reference. They can be found in test/simple/test-auth-old.js |
Wow, thank you so much for you help on this. There are a few things (tabs vs. spaces, test output, etc.) I like to do differently, but no worries - I'll take care of all that : ). Right now I'm working on integrating your branch into master and testing it against a mysql install that uses the old password mechanism. Once I got this going I'll let you know if it works! |
Alright, I got the branch rebased and _sendOldAuth all wired up. When testing against my test install I'm now getting: Error: Access denied for user 'root'@'my-host-name' (using password: YES) I've pushed my latest commits up, you can see them here: http://github.com/felixge/node-mysql/commits/oldpw If you have a suitable install around it'd be awesome if you could have a look and see if it works for you, or if you are hitting the same problem. Thanks, --fg |
Ok, nevermind my previous comment. Your code works fantastically! I just reformatted the styling a little to go along with the rest of the project and merged your commits into master and released v0.4.0 via npm! Thank you so much for your help on this one. I wasted hours on my buggy version of hash_password alone, it would have probably taken me forever to finish the rest of stuff you ported. Everybody else: I'm closing this issue now. Please test if you are now able to connect to your databases and let me know if you hit any issues. |
Awesome! |
Thanks to chengw (at) garena.com for the fix!
Pull recent changes from the main fork
* add RejectReadOnly * update README.md * close connection explicitly before returning ErrBadConn for 1792 (mysqljs#2) * add test and improve doc * doc/comment changes
Mysql uses some homebrew hashing and scrambling code for old passwords which needs to be ported to Javascript.
I have started some initial work here:
http://github.com/felixge/node-mysql/commit/0cb56d994641bad3426fd5cfc7e452f7903bc059
hash_password seems to be successfully ported, but I could need help with:
See this link for details:
http://github.com/felixge/node-mysql/blob/0cb56d994641bad3426fd5cfc7e452f7903bc059/test/fixture/libmysql_password.c#L34-72
The text was updated successfully, but these errors were encountered: