Fix a vulnerability. Someone could see a ledger proposal and send us a

malformed version of that ledger proposal that failed our validity check but
was similar enough to the real proposal to trick us into suppressing that
proposal as a duplicate.
This commit is contained in:
JoelKatz
2012-09-01 00:53:40 -07:00
parent 02bd898e51
commit 3bd054748e

View File

@@ -607,10 +607,12 @@ bool NetworkOPs::recvPropose(uint32 proposeSeq, const uint256& proposeHash, uint
// XXX Take a vuc for pubkey.
// Get a preliminary hash to use to suppress duplicates
Serializer s(128);
Serializer s(256);
s.add256(proposeHash);
s.add32(proposeSeq);
s.add32(getCurrentLedgerID());
s.add32(closeTime);
s.addRaw(pubKey);
s.addRaw(signature);
if (!theApp->isNew(s.getSHA512Half()))
return false;