8000 Bug: Password reset hangs up (doesn't call `res`) if account doesn't exist · Issue #13 · waterlock/waterlock-local-auth · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bug: Password reset hangs up (doesn't call res) if account doesn't exist #13

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

Open
leejt489 opened this issue Nov 26, 2014 · 0 comments
Open

Comments

@leejt489
Copy link

This is a bug. Simple issue User.findOne is called and the existence is checked here https://github.com/davidrivera/waterlock-local-auth/blob/master/lib/controllers/actions/reset.js#L92

Problem is that if the statement is false, res never gets called.

should just stick if (!a) return res.json(404) before that line

I claim it should be if (!a) return res.notFound() actually, but we'll settle that in the issue that I just opened up and stick with error codes for now :-)

Will create a PR soon, though maybe can't get to it until next week, just wanted jot this down

@leejt489 leejt489 changed the title Password reset hangs up (doesn't call res) if account doesn't exist Bug: Password reset hangs up (doesn't call res) if account doesn't exist Nov 26, 2014
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

No branches or pull requests

1 participant
0