mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix ledger_entry crash on invalid credentials request (#5189)
This commit is contained in:
@@ -41,6 +41,12 @@ parseAuthorizeCredentials(Json::Value const& jv)
|
||||
STArray arr(sfAuthorizeCredentials, jv.size());
|
||||
for (auto const& jo : jv)
|
||||
{
|
||||
if (!jo.isObject() || //
|
||||
!jo.isMember(jss::issuer) || !jo[jss::issuer].isString() ||
|
||||
!jo.isMember(jss::credential_type) ||
|
||||
!jo[jss::credential_type].isString())
|
||||
return {};
|
||||
|
||||
auto const issuer = parseBase58<AccountID>(jo[jss::issuer].asString());
|
||||
if (!issuer || !*issuer)
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user