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

'Channel_authorize' request with invalid key_type returns 'invalidParams' instead of 'badKeyType' error.(Version: [1.9.2]) #4289

Closed
mounikakun opened this issue Aug 30, 2022 · 0 comments · Fixed by #4618

Comments

@mounikakun
Copy link
Collaborator

Issue Description

“channel_authorize” with invalid key_type(ed255191) not returning expected error in the response. The key_type parameter in the request is not a valid key type. (Valid types are secp256k1 or ed25519.)

Steps to Reproduce

{ "method": "channel_authorize", "params": [{ "channel_id": "42AC583481E3CA98F8918A7616D333D473FD66C3807BFB10D6348AA97E3E8C3F", "key_type": "ed255191", "seed": "snHq1rzQoN2qiUkC3XF5RyxBzUtN", "amount": "51100000" }] }

Expected Result

"error": "badKeyType"

Actual Result

{ "result": { "error": "invalidParams", "error_code": 31, "error_message": "Invalid field 'key_type'.", "request": { "amount": "51100000", "channel_id": "42AC583481E3CA98F8918A7616D333D473FD66C3807BFB10D6348AA97E3E8C3F", "command": "channel_authorize", "key_type": "ed255191", "seed": "<masked>" }, "status": "error" } }

@intelliot intelliot linked a pull request Sep 7, 2023 that will close this issue
intelliot pushed a commit that referenced this issue Sep 21, 2023
gateway_balances
* When `account` does not exist in the ledger, return `actNotFound`
  * (Previously, a normal response was returned)
  * Fix #4290
* When required field(s) are missing, return `invalidParams`
  * (Previously, `invalidHotWallet` was incorrectly returned)
  * Fix #4548

channel_authorize
* When the specified `key_type` is invalid, return `badKeyType`
  * (Previously, `invalidParams` was returned)
  * Fix #4289

Since these are breaking changes, they apply only to API version 2.

Supersedes #4577
ckeshava pushed a commit to ckeshava/rippled that referenced this issue Sep 22, 2023
gateway_balances
* When `account` does not exist in the ledger, return `actNotFound`
  * (Previously, a normal response was returned)
  * Fix XRPLF#4290
* When required field(s) are missing, return `invalidParams`
  * (Previously, `invalidHotWallet` was incorrectly returned)
  * Fix XRPLF#4548

channel_authorize
* When the specified `key_type` is invalid, return `badKeyType`
  * (Previously, `invalidParams` was returned)
  * Fix XRPLF#4289

Since these are breaking changes, they apply only to API version 2.

Supersedes XRPLF#4577
sophiax851 pushed a commit to sophiax851/rippled that referenced this issue Jun 12, 2024
gateway_balances
* When `account` does not exist in the ledger, return `actNotFound`
  * (Previously, a normal response was returned)
  * Fix XRPLF#4290
* When required field(s) are missing, return `invalidParams`
  * (Previously, `invalidHotWallet` was incorrectly returned)
  * Fix XRPLF#4548

channel_authorize
* When the specified `key_type` is invalid, return `badKeyType`
  * (Previously, `invalidParams` was returned)
  * Fix XRPLF#4289

Since these are breaking changes, they apply only to API version 2.

Supersedes XRPLF#4577
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants