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

Logical precedence problem fixed #45

Merged
merged 1 commit into from
Apr 18, 2016
Merged

Conversation

neilyoung
Copy link

No description provided.

@chenkie
Copy link
Contributor

chenkie commented Feb 26, 2016

Thanks for this PR :) Can you elaborate on this fix, specifically in what cases the existing code would fail? Thanks!

@chanoch
Copy link

chanoch commented Apr 18, 2016

Chenkie - have a look at the code. Line 47 of user-routes has the following line:

if(!user.password === req.body.password) {

This will cause user.password to be evaluated for a truthy/falsy value and then compared with req.body.password. This pull request checks for equality between the two values and then negates the result.

Did you intend the result to be false unless the password is an empty string?

@chenkie chenkie merged commit 29f251c into auth0-blog:master Apr 18, 2016
@neilyoung
Copy link
Author

Sorry. Didn't comment because I got no mail notification :(
However, seems to be ok now :)

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.

3 participants