mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 05:12:15 +00:00
fix(security): persist voice-call replay protection
This commit is contained in:
@@ -293,10 +293,11 @@ export function createExecTool(
|
||||
}
|
||||
|
||||
const baseEnv = coerceEnv(process.env);
|
||||
const isHostExecution = !sandbox || host === "gateway" || host === "node";
|
||||
|
||||
// Logic: Sandbox gets raw env. Host (gateway/node) must pass validation.
|
||||
// We validate BEFORE merging to prevent any dangerous vars from entering the stream.
|
||||
if (host !== "sandbox" && params.env) {
|
||||
// When sandboxing is disabled, host=sandbox still executes on the gateway host.
|
||||
// Validate dangerous env overrides on every real host execution path.
|
||||
if (isHostExecution && params.env) {
|
||||
validateHostEnv(params.env);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user