mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user