Trap another malformed transaction form (RIPD-182):

A transaction with both a Signers array and a TxnSignature field
is malformed.
This commit is contained in:
Scott Schurr
2015-09-17 10:16:45 -07:00
committed by Vinnie Falco
parent f424ae6942
commit b44d68ea5d
2 changed files with 26 additions and 2 deletions

View File

@@ -305,6 +305,11 @@ STTx::checkMultiSign () const
if (!isFieldPresent (sfSigners))
return false;
// We don't allow both an sfSigners and an sfTxnSignature. Both fields
// being present would indicate that the transaction is signed both ways.
if (isFieldPresent (sfTxnSignature))
return false;
STArray const& signers {getFieldArray (sfSigners)};
// There are well known bounds that the number of signers must be within.