From 2c68351b4e090a46bc126a4701d5a79ecdc131ee Mon Sep 17 00:00:00 2001 From: sennevb Date: Tue, 15 Aug 2017 09:34:44 +0200 Subject: [PATCH] if invalid adress + workername = 40 if invalid adress + workername = 40 chars, it doesnt get authenticated.. --- libs/poolWorker.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/libs/poolWorker.js b/libs/poolWorker.js index 9e07385..32b25fe 100644 --- a/libs/poolWorker.js +++ b/libs/poolWorker.js @@ -136,16 +136,6 @@ module.exports = function(logger){ if (poolOptions.validateWorkerUsername !== true) authCallback(true); else { - if (workerName.length === 40) { - try { - new Buffer(workerName, 'hex'); - authCallback(true); - } - catch (e) { - authCallback(false); - } - } - else { pool.daemon.cmd('validateaddress', [String(workerName).split(".")[0]], function (results) { var isValid = results.filter(function (r) { return r.response.isvalid @@ -153,8 +143,7 @@ module.exports = function(logger){ authCallback(isValid); }); } - - } + }; handlers.share = function(isValidShare, isValidBlock, data){