-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
crypto.pbkdf2Sync can't handle non ASCII character in Node 6.9.2 #10265
Comments
Yes, the default encoding for the crypto methods changed in v6.x from I’m closing this as this is expected behaviour, but please feel free to ask follow-up questions! |
@addaleax shouldn't this be documented? https://nodejs.org/api/crypto.html#crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback says it was added in 0.5.5, it doesn't say it was changed in 6.x. |
@sam-github Yeah, maybe there should be a mention of that. It applies to virtually all |
Then docs are needed for all crypto functions, either in each one, or once at the top of the docs. |
I looked in the changelog and tried to find if any changes was made to "pbkdf2Sync", but I did not look for crypto. |
Information about the crypto encoding change has been added in d27c983, I’ll closed this as a fixed issue. |
After upgrading our servers from Node 4 to Node 6. I was not able to login with my password anymore, while my colleagues had no problem logging in. After some research I found that since my password contained the letter 'ö' the crypto.pbkdf2Sync failed to create the same hash in Node 6 as in Node 4. So it is broken for non ASCII characters like 'åäö'.
I made the following test that shows that the error started in version 6.0.0 of node.
The text was updated successfully, but these errors were encountered: