Merge pull request #26 from pmitchev/master
Fixed duplicate share vulnerability with the noncemaster
commit
3e0311f4aa
|
@ -518,7 +518,11 @@ function handleMinerMethod(method, params, ip, portData, sendReply, pushMessage)
|
|||
return;
|
||||
}
|
||||
|
||||
params.nonce = params.nonce.substr(0, 8).toLowerCase();
|
||||
|
||||
if (job.submissions.indexOf(params.nonce) !== -1){
|
||||
var minerText = miner ? (' ' + miner.login + '@' + miner.ip) : '';
|
||||
log('warn', logSystem, 'Duplicate share: ' + JSON.stringify(params) + ' from ' + minerText);
|
||||
sendReply('Duplicate share');
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue