Rehashing fetched password#174
Closed
zmonteca wants to merge 1 commit into
Closed
Conversation
This fixes rehashing the password when the password is not passed in the postData. The issue here is if a password was not passed, the user is fetched from the datasource and then the hashed password is rehashed. This results in rehashing a hash, which in turn unexpectedly updates the password as a hash of a hash. Accompanied by test updating single field and not modifying password.
There was a problem hiding this comment.
You are changing the test in a way it won't test what it is supposed to test. You don't call the edit() method any longer.
|
I change the isset() to !empty(). I guess you're extending the plugin and overloading the edit method? Because the users controller comes with a method change_password() and the model with changePassword() which are thought to update the password as they require the user to enter his old password to be able to change it. I think the code in edit() is a leftover or something, the !empty() should fix this. I'm going to push the fix in a moment. |
|
This should fix the issue a4e6a95 Please let me know if there is anything left. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes rehashing the password when the password is not passed in the postData. The issue here is if a password was not passed, the user is fetched from the datasource and then the hashed password is rehashed. This results in rehashing a hash, which in turn unexpectedly updates the password as a hash of a hash. Accompanied by test updating single field and not modifying password.