Skip to content

Rehashing fetched password#174

Closed
zmonteca wants to merge 1 commit into
CakeDC:developfrom
zmonteca:develop
Closed

Rehashing fetched password#174
zmonteca wants to merge 1 commit into
CakeDC:developfrom
zmonteca:develop

Conversation

@zmonteca

Copy link
Copy Markdown
Contributor

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.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@burzum

burzum commented Apr 27, 2014

Copy link
Copy Markdown

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.

burzum pushed a commit that referenced this pull request Apr 27, 2014
@burzum

burzum commented Apr 27, 2014

Copy link
Copy Markdown

This should fix the issue a4e6a95

Please let me know if there is anything left.

@burzum burzum closed this Apr 27, 2014
@burzum burzum added the bug label Apr 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants