<commit_before>var mongoose = require('mongoose');
var passportLocalMongoose = require('passport-local-mongoose');

var UserSchema = mongoose.Schema({
    username: {
        type: String,
        unique: true,
        required: true
    },
    canonicalname: {
        type: String,
        unique: true,
        required: true
    },
    scope: [String],
    uploadCount: {
        type: Number,
        default: 0
    },
    uploadSize: {
        type: Number,
        default: 0
    },
    date: Date
});

UserSchema.plugin(passportLocalMongoose, {usernameField: 'canonicalname'});

module.exports = mongoose.model('User', UserSchema);<commit_msg>Reduce pbkdf2 iterations<commit_after>var mongoose = require('mongoose');
var passportLocalMongoose = require('passport-local-mongoose');

var UserSchema = mongoose.Schema({
    username: {
        type: String,
        unique: true,
        required: true
    },
    canonicalname: {
        type: String,
        unique: true,
        required: true
    },
    scope: [String],
    uploadCount: {
        type: Number,
        default: 0
    },
    uploadSize: {
        type: Number,
        default: 0
    },
    date: Date
});

UserSchema.plugin(passportLocalMongoose, {
    usernameField: 'canonicalname',
    saltlen: 32,
    iterations: 10000,
    limitAttempts: true
});

module.exports = mongoose.model('User', UserSchema);
{'fraction_non_alphanumeric': 0.1199421965317919, 'fraction_numerical': 0.008670520231213872, 'mean_word_length': 2.5063291139240507, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7104945', 'n_tokens_mistral': 428, 'n_tokens_neox': 420, 'n_words': 93}