From a7736d19264588679cb9d9a91ae226f28ba97ffa Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 2 Sep 2014 11:48:28 -0400 Subject: [PATCH] removed setTimeout when someone tries to log in with a non-existant username --- src/routes/authentication.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/routes/authentication.js b/src/routes/authentication.js index 9841f3c69d..9b30ae08a9 100644 --- a/src/routes/authentication.js +++ b/src/routes/authentication.js @@ -216,11 +216,8 @@ return next(err); } - if (!uid) { - setTimeout(function() { - next(null, false, '[[error:invalid-password]]'); - }, Math.floor((Math.random() * 1000) + 1500)); // Wait between 1-2.5 seconds before returning - return; + if(!uid) { + return next(null, false, '[[error:no-user]]'); } user.auth.logAttempt(uid, function(err) {