utxostack / ckb-bitcoin-spv-service

Synchronize headers to Bitcoin SPV clients running on the CKB chain.
MIT License
1 stars 4 forks source link

Error message of JSON-RPC service exposes the internal endpoint information. #3

Closed yangby-cryptape closed 6 months ago

yangby-cryptape commented 6 months ago

Issue

Example:

Request:

curl -X POST -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0", "method":"getTxProof", "params": ["${A_Nonexistent_Tx_ID}", 0, 10], "id": 1}' \
    http://${Public_IP}:${Public_Port}

Response:

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32603,
        "message": "failed to get tx out proof for ${A_Nonexistent_Tx_ID} from remote since http error: HTTP status server error (500 Internal Server Error) for url (${Internal_Endpoint})"
    },
    "id": 1
}
yangby-cryptape commented 6 months ago

Resolves by #4, possibly.