mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
fix: disable channel_authorize when signing_support is disabled (#5385)
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user