0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Merge pull request #80 from javorszky/master

Replaced bcrypt with bcrypt-nodejs
This commit is contained in:
Hannah Wolfe 2013-05-27 10:17:38 -07:00
commit ba08bb4ed2
2 changed files with 4 additions and 3 deletions

View file

@ -3,7 +3,7 @@
var util = require('util'),
_ = require('underscore'),
bcrypt = require('bcrypt'),
bcrypt = require('bcrypt-nodejs'),
models = require('./models.js'),
when = require('when'),
nodefn = require('when/node/function'),
@ -30,9 +30,10 @@
// Clone the _user so we don't expose the hashed password unnecessarily
userData = _.extend({}, _user);
return nodefn.call(bcrypt.hash, _user.password, 10).then(function (hash) {
return nodefn.call(bcrypt.hash, _user.password, null, null).then(function (hash) {
userData.password = hash;
return BaseProvider.prototype.add.call(self, userData);
});
};

View file

@ -19,7 +19,7 @@
"bookshelf": "0.1.x",
"knex": "0.1.x",
"when": "2.1.x",
"bcrypt": "~0.7.5"
"bcrypt-nodejs": "0.0.3"
},
"devDependencies": {
"grunt": "~0.4.1",