diff --git a/lib/github-auth.js b/lib/github-auth.js index 642f3ae785..a6f6ddd252 100644 --- a/lib/github-auth.js +++ b/lib/github-auth.js @@ -104,9 +104,9 @@ function setRoutes(server) { }); server.route(/^\/github-auth\/add-token$/, function(data, match, end, ask) { - if (constEq(data.shieldsSecret, serverSecrets.shieldsSecret)) { - // An unknown entity tries to connect. Let the connection linger for a minute. - return setTimeout(function() { end('Invalid secret.'); }, 60000); + if (!constEq(data.shieldsSecret, serverSecrets.shieldsSecret)) { + // An unknown entity tries to connect. Let the connection linger for 10s. + return setTimeout(function() { end('Invalid secret.'); }, 10000); } addGithubToken(data.token); end('Thanks!');