mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 01:51:24 +00:00
Media: include state workspace/sandbox in local path allowlist
This commit is contained in:
@@ -3,6 +3,7 @@ import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import type { SsrFPolicy } from "../infra/net/ssrf.js";
|
||||
import { STATE_DIR } from "../config/paths.js";
|
||||
import { logVerbose, shouldLogVerbose } from "../globals.js";
|
||||
import { type MediaKind, maxBytesForKind, mediaKindFromMime } from "../media/constants.js";
|
||||
import { fetchRemoteMedia } from "../media/fetch.js";
|
||||
@@ -32,11 +33,12 @@ type WebMediaOptions = {
|
||||
};
|
||||
|
||||
function getDefaultLocalRoots(): string[] {
|
||||
const home = os.homedir();
|
||||
return [
|
||||
os.tmpdir(),
|
||||
path.join(home, ".openclaw", "media"),
|
||||
path.join(home, ".openclaw", "agents"),
|
||||
path.join(STATE_DIR, "media"),
|
||||
path.join(STATE_DIR, "agents"),
|
||||
path.join(STATE_DIR, "workspace"),
|
||||
path.join(STATE_DIR, "sandboxes"),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user