Allow ghost users to skip 2fa
This commit is contained in:
@@ -220,7 +220,10 @@ function verify(userId, password, callback) {
|
||||
if (error) return callback(error);
|
||||
|
||||
// for just invited users the username may be still null
|
||||
if (user.username && verifyGhost(user.username, password)) return callback(null, user);
|
||||
if (user.username && verifyGhost(user.username, password)) {
|
||||
user.ghost = true;
|
||||
return callback(null, user);
|
||||
}
|
||||
|
||||
var saltBinary = new Buffer(user.salt, 'hex');
|
||||
crypto.pbkdf2(password, saltBinary, CRYPTO_ITERATIONS, CRYPTO_KEY_LENGTH, CRYPTO_DIGEST, function (error, derivedKey) {
|
||||
|
||||
Reference in New Issue
Block a user