From c246d3738a24e3cf2f90efee89f1db2248b9ea8f Mon Sep 17 00:00:00 2001 From: Jack Foltz Date: Wed, 25 Jul 2018 18:45:08 -0400 Subject: [PATCH] Reduce pbkdf2 iterations --- app/models/User.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/models/User.js b/app/models/User.js index 5e4c514..87a1e44 100644 --- a/app/models/User.js +++ b/app/models/User.js @@ -24,6 +24,11 @@ var UserSchema = mongoose.Schema({ date: Date }); -UserSchema.plugin(passportLocalMongoose, {usernameField: 'canonicalname'}); +UserSchema.plugin(passportLocalMongoose, { + usernameField: 'canonicalname', + saltlen: 32, + iterations: 10000, + limitAttempts: true +}); module.exports = mongoose.model('User', UserSchema); \ No newline at end of file