mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 08:11:26 +00:00
fix(sandbox): block @-prefixed workspace path bypass
This commit is contained in:
@@ -571,7 +571,7 @@ function mapContainerPathToWorkspaceRoot(params: {
|
||||
return params.filePath;
|
||||
}
|
||||
|
||||
let candidate = params.filePath;
|
||||
let candidate = params.filePath.startsWith("@") ? params.filePath.slice(1) : params.filePath;
|
||||
if (/^file:\/\//i.test(candidate)) {
|
||||
try {
|
||||
candidate = fileURLToPath(candidate);
|
||||
|
||||
Reference in New Issue
Block a user