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
security(passwords): switches password hashing to password_hash() #7594
Conversation
notify_user($user->guid, | ||
elgg_get_site_entity()->guid, | ||
_elgg_services()->translator->translate("email:$ns:subject"), | ||
_elgg_services()->translator->translate("email:$ns:body", array($user->username, $password)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass in user's language as the third parameter to the translate() calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx. Fixed here and in sendNewPasswordRequest()
ALTER TABLE {$dbprefix}users_entity | ||
ADD `password_hash` varchar(255) NOT NULL DEFAULT '' | ||
AFTER `salt` | ||
"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: the upgrade name implies that running this upgrade makes hashes better, but in fact it only adds a new column.
LGTM in general |
This gradually migrates users to modern hashes as they log in; deprecates setting the salt/password attributes in favor of a new setPassword() method (setting salt/password continues to work but will revert the user to the legacy MD5 hashing); and moves core password functionality to a PasswordService object. Fixes Elgg#4665
security(passwords): switches password hashing to password_hash()
@juho-jaakkola I addressed your comments and pulled the trigger. |
Woohoo this is a big improvement! |
(replaces #7495)
This gradually migrates users to modern hashes as they log in; deprecates
setting the salt/password attributes in favor of a new setPassword() method
(setting salt/password continues to work but will revert the user to the
legacy MD5 hashing); and moves core password functionality to a
PasswordService object.
Fixes #4665.