mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 05:41:24 +00:00
fix: enforce apply_patch workspaceOnly in sandbox mounts
This commit is contained in:
@@ -260,6 +260,14 @@ async function resolvePatchPath(
|
||||
filePath,
|
||||
cwd: options.cwd,
|
||||
});
|
||||
if (options.workspaceOnly !== false) {
|
||||
await assertSandboxPath({
|
||||
filePath: resolved.hostPath,
|
||||
cwd: options.cwd,
|
||||
root: options.cwd,
|
||||
allowFinalSymlink: purpose === "unlink",
|
||||
});
|
||||
}
|
||||
return {
|
||||
resolved: resolved.hostPath,
|
||||
display: resolved.relativePath || resolved.hostPath,
|
||||
|
||||
Reference in New Issue
Block a user