From 689c3fc22815233b4f32f4162ee2c4339660ec70 Mon Sep 17 00:00:00 2001 From: Andrew Koroluk Date: Fri, 1 Sep 2017 09:43:30 -0400 Subject: [PATCH] fix(server:auth): specify digest for pbkdf2 fixes #2628 --- .../app/server/api/user(auth)/user.model(mongooseModels).js | 3 +-- .../app/server/api/user(auth)/user.model(sequelizeModels).js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/templates/app/server/api/user(auth)/user.model(mongooseModels).js b/templates/app/server/api/user(auth)/user.model(mongooseModels).js index c62104f0b..08a1e7e9f 100644 --- a/templates/app/server/api/user(auth)/user.model(mongooseModels).js +++ b/templates/app/server/api/user(auth)/user.model(mongooseModels).js @@ -252,8 +252,7 @@ UserSchema.methods = { .toString('base64'); } - return crypto.pbkdf2(password, salt, defaultIterations, defaultKeyLength, - 'sha1', (err, key) => { + return crypto.pbkdf2(password, salt, defaultIterations, defaultKeyLength, 'sha1', (err, key) => { if(err) { return callback(err); } else { diff --git a/templates/app/server/api/user(auth)/user.model(sequelizeModels).js b/templates/app/server/api/user(auth)/user.model(sequelizeModels).js index 991bc9403..bd5a5d37b 100644 --- a/templates/app/server/api/user(auth)/user.model(sequelizeModels).js +++ b/templates/app/server/api/user(auth)/user.model(sequelizeModels).js @@ -184,7 +184,7 @@ export default function(sequelize, DataTypes) { .toString('base64'); } - return crypto.pbkdf2(password, salt, defaultIterations, defaultKeyLength, + return crypto.pbkdf2(password, salt, defaultIterations, defaultKeyLength, 'sha1', function(err, key) { if(err) { callback(err);