Skip to content

Commit

Permalink
Fix regression in node 10.x - see nodejs/node-v0.x-archive#5003
Browse files Browse the repository at this point in the history
  • Loading branch information
saintedlama committed Apr 30, 2013
1 parent c25b1cd commit 9d8ccdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/passport-local-mongoose.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = function(schema, options) {
return cb(err);
}

self[options.hashField] = new Buffer(hashRaw).toString('hex');
self[options.hashField] = new Buffer(hashRaw, 'binary').toString('hex');
self[options.saltField] = salt;

cb(null, self);
Expand All @@ -55,7 +55,7 @@ module.exports = function(schema, options) {
return cb(err);
}

var hash = new Buffer(hashRaw).toString('hex');
var hash = new Buffer(hashRaw, 'binary').toString('hex');

if (hash === self[options.hashField]) {
return cb(null, self);
Expand Down

0 comments on commit 9d8ccdd

Please sign in to comment.