mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Disallow account one in payments
This commit is contained in:
@@ -400,6 +400,12 @@ toStrandV2 (
|
||||
!isConsistent(deliver) || (sendMaxIssue && !isConsistent(*sendMaxIssue)))
|
||||
return {temBAD_PATH, Strand{}};
|
||||
|
||||
if ((sendMaxIssue && sendMaxIssue->account == noAccount()) ||
|
||||
(src == noAccount()) ||
|
||||
(dst == noAccount()) ||
|
||||
(deliver.account == noAccount()))
|
||||
return {temBAD_PATH, Strand{}};
|
||||
|
||||
for (auto const& pe : path)
|
||||
{
|
||||
auto const t = pe.getNodeType();
|
||||
@@ -423,6 +429,12 @@ toStrandV2 (
|
||||
if (hasCurrency && hasIssuer &&
|
||||
isXRP(pe.getCurrency()) != isXRP(pe.getIssuerID()))
|
||||
return {temBAD_PATH, Strand{}};
|
||||
|
||||
if (hasIssuer && (pe.getIssuerID() == noAccount()))
|
||||
return {temBAD_PATH, Strand{}};
|
||||
|
||||
if (hasAccount && (pe.getAccountID() == noAccount()))
|
||||
return {temBAD_PATH, Strand{}};
|
||||
}
|
||||
|
||||
Issue curIssue = [&]
|
||||
|
||||
Reference in New Issue
Block a user