Hotfix for account_info, ledger_data and ip() (#134)

* remove option to create account from seed

* catch errors in derived().ip()

* checks keys.size() before accessing
This commit is contained in:
Nathan Nichols
2022-03-25 15:57:32 -05:00
committed by GitHub
parent ac6c4c25d6
commit e526083456
8 changed files with 76 additions and 43 deletions

View File

@@ -48,16 +48,8 @@ doAccountInfo(Context const& context)
// Get info on account.
auto accountID = accountFromStringStrict(strIdent);
if (!accountID)
{
if (!request.contains("strict") || !request.at("strict").as_bool())
{
accountID = accountFromSeed(strIdent);
if (!accountID)
return Status{Error::rpcBAD_SEED};
}
else
return Status{Error::rpcACT_MALFORMED};
}
return Status{Error::rpcACT_MALFORMED};
assert(accountID.has_value());
auto key = ripple::keylet::account(accountID.value());