-
-
Notifications
You must be signed in to change notification settings - Fork 2
#21022 Add sha2 pre-hashing for passwords #5
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
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
# Conflicts: # tests/phpunit/tests/auth.php
8a20f95 to
1cebd80
Compare
|
@soatok @dd32 @Synchro @pkevan Thanks for your input on WordPress#7333 . This is the linked PR that I wrote at the same time which implements pre-hashing in order to avoid the 72 byte length limit of bcrypt. I've detailed in the description above why a prefix is needed on the resulting hash. I've just updated it to use hash_hmac instead of manually prepending a prefix on the password value based on the info from @soatok. If we were to go ahead with pre-hashing, what are your thoughts on this approach? |
|
LGTM. This would satisfy the baseline requirements I mentioned in the other thread. While there may be some additional security benefit to having another constant added to https://api.wordpress.org/secret-key/1.1/salt/ and then used in the HMAC step, it would also require admins to manage those salts (e.g., when migrating or restoring from backup). This PR balances a minimal operational load with disarming bcrypt's footgun. |
This introduces password pre-hashing in order to retain the entropy of passwords greater than 72 bytes in size.
wp-prefix is needed in order to differentiate between passwords hashed using this mechanism by WordPress core and a password hashed using vanilla bcrypt via one of the several existing plugins that implement bcrypt. Not doing so would mean not being able to support and upgrade passwords hashed by one of those plugins.See WordPress#7333 for full details.
Supporting references
Tickets
Trac ticket: https://core.trac.wordpress.org/ticket/21022
Trac ticket: https://core.trac.wordpress.org/ticket/50027