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

Adds legacySalt argument to PasswordValidatorInterface #6

Merged
merged 8 commits into from
May 14, 2014

Conversation

jeremykendall
Copy link
Owner

Allows using salts with the UpgradeValidator. Inspired by @karptonite's Rehashing Password Hashes blog post.

@jeremykendall
Copy link
Owner Author

@karptonite You were right on all counts. I must have taken stupid pills with my coffee this morning, I swear.

You definitely need the salt--there is no way to reproduce the legacyHash (which becomes the new password) unless you have the original salt, unless the legacy system hashes the password without salt.

This is what I've come up with, adding the ability to pass salts to PasswordValidatorInterface::isValid, and here's a sample implementation of the $validatorCallback that takes salts into account.

jeremykendall added a commit that referenced this pull request May 14, 2014
…upgrade-scenario

Adds legacySalt argument to PasswordValidatorInterface
@jeremykendall jeremykendall merged commit 52cd57f into develop May 14, 2014
@jeremykendall jeremykendall deleted the example/daniel-karps-rehash-upgrade-scenario branch May 14, 2014 08:43
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.

None yet

2 participants