mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 05:37:34 +03:00
Replaced bcrypt with bcrypt-nodejs
This commit is contained in:
parent
1e47f4e825
commit
18166337b8
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
var util = require('util'),
|
var util = require('util'),
|
||||||
_ = require('underscore'),
|
_ = require('underscore'),
|
||||||
bcrypt = require('bcrypt'),
|
bcrypt = require('bcrypt-nodejs'),
|
||||||
models = require('./models.js'),
|
models = require('./models.js'),
|
||||||
when = require('when'),
|
when = require('when'),
|
||||||
nodefn = require('when/node/function'),
|
nodefn = require('when/node/function'),
|
||||||
@ -30,9 +30,10 @@
|
|||||||
// Clone the _user so we don't expose the hashed password unnecessarily
|
// Clone the _user so we don't expose the hashed password unnecessarily
|
||||||
userData = _.extend({}, _user);
|
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;
|
userData.password = hash;
|
||||||
return BaseProvider.prototype.add.call(self, userData);
|
return BaseProvider.prototype.add.call(self, userData);
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"bookshelf": "0.1.x",
|
"bookshelf": "0.1.x",
|
||||||
"knex": "0.1.x",
|
"knex": "0.1.x",
|
||||||
"when": "2.1.x",
|
"when": "2.1.x",
|
||||||
"bcrypt": "~0.7.5"
|
"bcrypt-nodejs": "0.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"grunt": "~0.4.1",
|
"grunt": "~0.4.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user