Merge pull request #2002 from tthakurani/master

Converted password to a string before creating hash
This commit is contained in:
Jim LAURIE 2018-09-25 11:09:37 +02:00 committed by GitHub
commit 3dc4618cb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,7 @@ module.exports = {
if (!user.password || this.isHashed(user.password)) { if (!user.password || this.isHashed(user.password)) {
resolve(null); resolve(null);
} else { } else {
bcrypt.hash(user.password, 10, (err, hash) => { bcrypt.hash(`${user.password}`, 10, (err, hash) => {
resolve(hash); resolve(hash);
}); });
} }