mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-05 08:47:53 +00:00
This commit is contained in:
@@ -73,7 +73,7 @@ Import::getInnerTxn(STTx const& outer, beast::Journal const& j,Json::Value const
|
||||
|
||||
std::optional<Json::Value> xpop_storage;
|
||||
|
||||
if (!xpop)
|
||||
if (!xpop && outer.isFieldPresent(sfBlob))
|
||||
{
|
||||
xpop_storage = syntaxCheckXPOP(outer.getFieldVL(sfBlob), j);
|
||||
xpop = &(*xpop_storage);
|
||||
@@ -142,6 +142,14 @@ Import::preflight(PreflightContext const& ctx)
|
||||
|
||||
auto& tx = ctx.tx;
|
||||
|
||||
if (!tx.isFieldPresent(sfBlob))
|
||||
{
|
||||
JLOG(ctx.j.warn())
|
||||
<< "Import: sfBlob was missing (should be impossible) "
|
||||
<< tx.getTransactionID();
|
||||
return temMALFORMED;
|
||||
}
|
||||
|
||||
if (tx.getFieldVL(sfBlob).size() > (512 * 1024))
|
||||
{
|
||||
JLOG(ctx.j.warn())
|
||||
@@ -843,6 +851,9 @@ Import::preclaim(PreclaimContext const& ctx)
|
||||
if (!ctx.view.rules().enabled(featureImport))
|
||||
return temDISABLED;
|
||||
|
||||
if (!ctx.tx.isFieldPresent(sfBlob))
|
||||
return tefINTERNAL;
|
||||
|
||||
// parse blob as json
|
||||
auto const xpop =
|
||||
syntaxCheckXPOP(ctx.tx.getFieldVL(sfBlob), ctx.j);
|
||||
@@ -1094,6 +1105,9 @@ Import::doApply()
|
||||
if (!view().rules().enabled(featureImport))
|
||||
return temDISABLED;
|
||||
|
||||
if (!ctx_.tx.isFieldPresent(sfBlob))
|
||||
return tefINTERNAL;
|
||||
|
||||
//
|
||||
// Before starting decode and validate XPOP, update ImportVL seq
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user