mirror of https://github.com/BTCPrivate/z-nomp.git
if invalid adress + workername = 40
if invalid adress + workername = 40 chars, it doesnt get authenticated..
This commit is contained in:
parent
e8e52e3eb3
commit
2c68351b4e
|
@ -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){
|
||||
|
|
Loading…
Reference in New Issue