Bug: Password reset hangs up (doesn't call `res`) if account doesn't exist · Issue #13 · waterlock/waterlock-local-auth · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
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 lineI 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
The text was updated successfully, but these errors were encountered: