mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 06:40:22 +00:00
fix(security): block env depth-overflow approval bypass
This commit is contained in:
@@ -478,6 +478,17 @@ export function resolveDispatchWrapperExecutionPlan(
|
||||
}
|
||||
current = unwrap.argv;
|
||||
}
|
||||
if (wrappers.length >= maxDepth) {
|
||||
const overflow = unwrapKnownDispatchWrapperInvocation(current);
|
||||
if (overflow.kind === "blocked" || overflow.kind === "unwrapped") {
|
||||
return {
|
||||
argv: current,
|
||||
wrappers,
|
||||
policyBlocked: true,
|
||||
blockedWrapper: overflow.wrapper,
|
||||
};
|
||||
}
|
||||
}
|
||||
return { argv: current, wrappers, policyBlocked: false };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user