Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ledger with string input to full or accounts with ledger_index current is forwarding admin requests to rippled] (Version: [2.2.3-rc2]) #1635

Closed
mounikakun opened this issue Sep 6, 2024 · 0 comments · Fixed by #1640
Assignees
Labels
bug Something isn't working

Comments

@mounikakun
Copy link
Collaborator

Issue Description

Rippled is accepting malformed values as inputs for full and accounts and here's the issue link

If malformed values are given as inputs to full or accounts parameters of ledger API with ledger_index:current, Clio forwards the request to rippled and rippled might be accepting those as admin requests. Clio returns failedToForward error as there's no response within forward_request_timeout.

Steps to Reproduce

Test data: "False", "True", "malformedinput", 0, 1, -1, "@#$%^"
Test parameters: "full", "accounts"

{
    "method": "ledger",
    "params": [
        {
            "full": "malformedinput",
            "ledger_index": "current"
        }
    ]
}

Expected Result

Expectation is to stop rippled from accepting admin requests forwarded by Clio.

Below are my suggestions to fix the issue:

  • Error out from Clio if there's a non boolean input to full and accounts before forwarding to rippled when there's ledger_index:current in the request.
  • Push on rippled end to prioritize the fix for issue

Actual Result

{
    "result": {
        "error": "failedToForward",
        "error_code": 90,
        "error_message": "Failed to forward request to p2p node",
        "status": "error",
        "type": "response",
        "request": {
            "method": "ledger",
            "params": [
                {
                    "full": "malformedinput",
                    "ledger_index": "current"
                }
            ]
        }
    },
    "warnings": [
        {
            "id": 2001,
            "message": "This is a clio server. clio only serves validated data. If you want to talk to rippled, include 'ledger_index':'current' in your request"
        }
    ]
}

Environment

Clio: 2.2.3-rc2, Clio rippled: 2.3.0-b1

Supporting Files

@mounikakun mounikakun added the bug Something isn't working label Sep 6, 2024
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Clio Sep 6, 2024
@cindyyan317 cindyyan317 self-assigned this Sep 9, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Merged in Clio Sep 9, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Merged in Clio Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Merged
Development

Successfully merging a pull request may close this issue.

2 participants