mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 13:40:44 +00:00
fix: support home-relative media paths
This commit is contained in:
@@ -17,6 +17,10 @@ Remote `MEDIA:` attachments must be public `https:` URLs. Plain `http:`,
|
||||
loopback, link-local, private, and internal hostnames are ignored as attachment
|
||||
directives; server-side media fetchers still enforce their own network guards.
|
||||
|
||||
Local `MEDIA:` attachments can use absolute paths, workspace-relative paths, or
|
||||
home-relative `~/` paths. They still pass through the agent file-read policy and
|
||||
media type checks before delivery.
|
||||
|
||||
Plain Markdown image syntax stays text by default. Channels that intentionally
|
||||
map Markdown image replies to media attachments opt in at their outbound
|
||||
adapter; Telegram does this so `` can still become a media reply.
|
||||
|
||||
@@ -203,6 +203,7 @@ Local-path behavior follows the same file-read trust model as the agent:
|
||||
|
||||
- If `tools.fs.workspaceOnly` is `true`, outbound `MEDIA:` local paths stay restricted to the OpenClaw temp root, the media cache, agent workspace paths, and sandbox-generated files.
|
||||
- If `tools.fs.workspaceOnly` is `false`, outbound `MEDIA:` can use host-local files the agent is already allowed to read.
|
||||
- Local paths can be absolute, workspace-relative, or home-relative with `~/`.
|
||||
- Host-local sends still only allow media and safe document types (images, audio, video, PDF, and Office documents). Plain text and secret-like files are not treated as sendable media.
|
||||
|
||||
That means generated images/files outside the workspace can now send when your fs policy already allows those reads, without reopening arbitrary host-text attachment exfiltration.
|
||||
|
||||
Reference in New Issue
Block a user