mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 07:37:39 +00:00
refactor(security): unify exec approval request matching
This commit is contained in:
@@ -43,7 +43,7 @@ export function createExecApprovalHandlers(
|
||||
const p = params as {
|
||||
id?: string;
|
||||
command: string;
|
||||
commandArgv?: string[] | null;
|
||||
commandArgv?: string[];
|
||||
cwd?: string;
|
||||
nodeId?: string;
|
||||
host?: string;
|
||||
@@ -63,7 +63,7 @@ export function createExecApprovalHandlers(
|
||||
const nodeId = typeof p.nodeId === "string" ? p.nodeId.trim() : "";
|
||||
const commandArgv = Array.isArray(p.commandArgv)
|
||||
? p.commandArgv.map((entry) => String(entry))
|
||||
: null;
|
||||
: undefined;
|
||||
if (host === "node" && !nodeId) {
|
||||
respond(
|
||||
false,
|
||||
|
||||
Reference in New Issue
Block a user