diff --git a/src/modules/plugins/rpc.ts b/src/modules/plugins/rpc.ts index d005a1f..1df1014 100644 --- a/src/modules/plugins/rpc.ts +++ b/src/modules/plugins/rpc.ts @@ -93,6 +93,13 @@ const plugin: Plugin = { throw new Error("relays required"); } + if ( + req?.request?.module === "rpc" && + req?.request?.method === "broadcast_request" + ) { + throw new Error("recursive broadcast_request calls are not allowed"); + } + let resp = await broadcastRequest(req.request, req.relays); const result: RPCBroadcastResponse = {