mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-17 05:21:27 +02:00
Security Update
Update to patch a small bug in the pool source. Thanks to MinerCircle for catching this.
This commit is contained in:
@@ -724,6 +724,13 @@ function handleMinerData(method, params, ip, portData, sendReply, pushMessage) {
|
||||
}
|
||||
job.submissions.push(params.nonce);
|
||||
} else {
|
||||
if (!Number.isInteger(params.poolNonce) || !Number.isInteger(params.workerNonce)) {
|
||||
console.warn(threadName + 'Malformed nonce: ' + JSON.stringify(params) + ' from ' + miner.logString);
|
||||
miner.checkBan(false);
|
||||
sendReply('Duplicate share');
|
||||
global.database.storeInvalidShare(miner.invalidShareProto);
|
||||
return;
|
||||
}
|
||||
let nonce_test = `${params.nonce}_${params.poolNonce}_${params.workerNonce}`;
|
||||
if (job.submissions.indexOf(nonce_test) !== -1) {
|
||||
console.warn(threadName + 'Duplicate share: ' + JSON.stringify(params) + ' from ' + miner.logString);
|
||||
|
||||
Reference in New Issue
Block a user