Skip to content

Commit eac66ba

Browse files
committed
fix(security): close config and hosted media review gaps
1 parent adf9c79 commit eac66ba

19 files changed

Lines changed: 2106 additions & 456 deletions

‎docs/channels/synology-chat.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ but duplicate exact paths are still rejected fail-closed. Prefer explicit per-ac
173173
- Keep `dangerouslyAllowNameMatching` off unless you explicitly need legacy username-based reply delivery.
174174
- Keep `dangerouslyAllowInheritedWebhookPath` off unless you explicitly accept shared-path routing risk in a multi-account setup.
175175
- Reverse-proxy access logs can capture attachment capability tokens. Disable query-string logging or redact `__openclaw_synology_media_token_*` parameters, and keep application logs free of full capability URLs.
176-
- Hosted attachments use `Content-Disposition: attachment`, `X-Content-Type-Options: nosniff`, and `Cache-Control: no-store`. OpenClaw preserves the frozen file bytes and supported content type, including HTML, SVG, XHTML, and XML, without executing or reinterpreting the attachment.
176+
- Hosted attachments use `Content-Disposition: attachment`, `X-Content-Type-Options: nosniff`, and `Cache-Control: no-store`. Files declared or named as HTML, SVG, or XML are rejected. Frozen bytes that begin as a UTF-8, UTF-16, or UTF-32 markup document after an optional encoding marker, whitespace, and comments are also rejected; literal tags later in passive text or source files do not make those files active documents.
177177

178178
## Troubleshooting
179179

‎docs/plugins/sdk-channel-plugins.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,9 @@ the shared outbound loader. Hosted media capacity defaults to
296296
`overflowPolicy: "evict-oldest"` for compatibility. Use `"reject-new"` when
297297
issued URLs must remain valid until expiry, and configure both backing keyed
298298
stores with `"reject-new"` so independent writers cannot evict live rows.
299+
Use `validateBeforePersist` to inspect the guarded loader's exact bytes and
300+
metadata when a transport must reject a payload class. Treat its buffer as
301+
read-only and throw to reject before capability creation or any store write.
299302
Authenticate bearer requests with `readMetadata(...)` before calling `read(...)`
300303
so invalid tokens and `HEAD` requests do not hydrate stored media chunks.
301304

0 commit comments

Comments
 (0)