mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 12:21:24 +00:00
fix(gateway): block node.invoke exec approvals
This commit is contained in:
@@ -388,6 +388,18 @@ export const nodeHandlers: GatewayRequestHandlers = {
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (command === "system.execApprovals.get" || command === "system.execApprovals.set") {
|
||||
respond(
|
||||
false,
|
||||
undefined,
|
||||
errorShape(
|
||||
ErrorCodes.INVALID_REQUEST,
|
||||
"node.invoke does not allow system.execApprovals.*; use exec.approvals.node.*",
|
||||
{ details: { command } },
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
await respondUnavailableOnThrow(respond, async () => {
|
||||
const nodeSession = context.nodeRegistry.get(nodeId);
|
||||
|
||||
Reference in New Issue
Block a user