Skip to content

Commit

Permalink
Don't give back the stored password hash !
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Nov 7, 2011
1 parent 7add39d commit e8faf94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/server.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ app.post '/login', (req, res) ->
if sha1(req.body.password) == user.sha1
res.send { result: 'success', session_token: generateToken(user.username), user: user }
else
res.send { result: 'failure', provided: sha1(req.body.password), stored: user.sha1 }
res.send { result: 'failure', provided: sha1(req.body.password) }

This comment has been minimized.

Copy link
@nddrylliog

nddrylliog Nov 7, 2011

Collaborator

Well provided is useless as well.. was using that for debug. Forgot to remove it completely, you must have had a major wtf seeing that ;)

This comment has been minimized.

Copy link
@romac

romac via email Nov 7, 2011

Author Collaborator

app.get '/user/:username', requiresToken (req, res) ->
User.findOne { username: req.params.username }, (err, user) ->
Expand Down

0 comments on commit e8faf94

Please sign in to comment.