mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-04 01:06:48 +00:00
audit 4
This commit is contained in:
@@ -157,7 +157,13 @@ Transactor::preflight1(PreflightContext const& ctx, std::uint32_t flagMask)
|
||||
return temINVALID_FLAG;
|
||||
}
|
||||
|
||||
if (hasSponsorSig && !hasSponsor)
|
||||
if (!hasSponsor && hasSponsorFlags)
|
||||
{
|
||||
JLOG(ctx.j.debug()) << "preflight1: sponsor flags without sponsor definition";
|
||||
return temINVALID_FLAG;
|
||||
}
|
||||
|
||||
if (!hasSponsor && hasSponsorSig)
|
||||
{
|
||||
JLOG(ctx.j.debug()) << "preflight1: sponsor signature without sponsor definition";
|
||||
return temMALFORMED;
|
||||
|
||||
@@ -315,6 +315,11 @@ public:
|
||||
|
||||
// Invalid Flags
|
||||
env(noop(alice), sponsor::as(sponsor, (tfSponsorFee | tfSponsorReserve) + 1), ter(temINVALID_FLAG));
|
||||
|
||||
// Invalid Flags without sponsor
|
||||
auto tx = noop(alice);
|
||||
tx[sfSponsorFlags.jsonName] = tfSponsorFee | tfSponsorReserve;
|
||||
env(tx, ter(temINVALID_FLAG));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user