fix: disable channel_authorize when signing_support is disabled (#5385)

This commit is contained in:
Mayukha Vadari
2025-04-04 21:08:34 -04:00
committed by GitHub
parent e923ec6d36
commit 4ba9288935
2 changed files with 16 additions and 1 deletions

View File

@@ -83,9 +83,17 @@ The [commandline](https://xrpl.org/docs/references/http-websocket-apis/api-conve
The `network_id` field was added in the `server_info` response in version 1.5.0 (2019), but it is not returned in [reporting mode](https://xrpl.org/rippled-server-modes.html#reporting-mode). However, use of reporting mode is now discouraged, in favor of using [Clio](https://github.com/XRPLF/clio) instead.
## XRP Ledger server version 2.5.0
As of 2025-04-04, version 2.5.0 is in development. You can use a pre-release version by building from source or [using the `nightly` package](https://xrpl.org/docs/infrastructure/installation/install-rippled-on-ubuntu).
### Additions and bugfixes in 2.5.0
- `channel_authorize`: If `signing_support` is not enabled in the config, the RPC is disabled.
## XRP Ledger server version 2.4.0
As of 2025-01-28, version 2.4.0 is in development. You can use a pre-release version by building from source or [using the `nightly` package](https://xrpl.org/docs/infrastructure/installation/install-rippled-on-ubuntu).
[Version 2.4.0](https://github.com/XRPLF/rippled/releases/tag/2.4.0) was released on March 4, 2025.
### Additions and bugfixes in 2.4.0

View File

@@ -17,6 +17,7 @@
*/
//==============================================================================
#include <xrpld/app/main/Application.h>
#include <xrpld/ledger/ReadView.h>
#include <xrpld/rpc/Context.h>
#include <xrpld/rpc/detail/RPCHelpers.h>
@@ -40,6 +41,12 @@ namespace ripple {
Json::Value
doChannelAuthorize(RPC::JsonContext& context)
{
if (context.role != Role::ADMIN && !context.app.config().canSign())
{
return RPC::make_error(
rpcNOT_SUPPORTED, "Signing is not supported by this server.");
}
auto const& params(context.params);
for (auto const& p : {jss::channel_id, jss::amount})
if (!params.isMember(p))