From cc655ffcc38eedded4f8632b26e4afcbe4dbd4c1 Mon Sep 17 00:00:00 2001 From: hzhang Date: Fri, 15 May 2026 21:50:34 +0100 Subject: [PATCH] fix(plugin): pass only local MediaPaths (drop SSRF-blocked MediaUrls) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Live round-trip test showed openclaw's SSRF guard blocking the localhost guild file URL passed via MediaUrls. We already download the bytes with the agent's guild token, so MediaUrls is redundant and noisy — provide only local MediaPaths/MediaTypes. Verified: plugin logs 'fetched N attachment(s)' and the SSRF WARN is gone. Co-Authored-By: Claude Opus 4.7 (1M context) --- dist/fabric/src/inbound.js | 6 ++++-- src/inbound.ts | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dist/fabric/src/inbound.js b/dist/fabric/src/inbound.js index 7bbae8d..ac716e7 100644 --- a/dist/fabric/src/inbound.js +++ b/dist/fabric/src/inbound.js @@ -173,14 +173,16 @@ export class FabricInbound { Timestamp: m.createdAt ? Date.parse(m.createdAt) : Date.now(), OriginatingChannel: 'fabric', OriginatingTo: `fabric:${channelId}`, + // Provide ONLY local paths. The guild file URL is on a private host + // (e.g. localhost); openclaw's SSRF guard blocks re-fetching it, so + // passing MediaUrls is both redundant (we already downloaded the + // bytes) and noisy. Local MediaPaths is the reliable delivery. ...(media.paths.length ? { MediaPaths: media.paths, MediaTypes: media.types, - MediaUrls: media.urls, MediaPath: media.paths[0], MediaType: media.types[0], - MediaUrl: media.urls[0], } : {}), }); diff --git a/src/inbound.ts b/src/inbound.ts index c542a7f..911e783 100644 --- a/src/inbound.ts +++ b/src/inbound.ts @@ -212,14 +212,16 @@ export class FabricInbound { Timestamp: m.createdAt ? Date.parse(m.createdAt) : Date.now(), OriginatingChannel: 'fabric', OriginatingTo: `fabric:${channelId}`, + // Provide ONLY local paths. The guild file URL is on a private host + // (e.g. localhost); openclaw's SSRF guard blocks re-fetching it, so + // passing MediaUrls is both redundant (we already downloaded the + // bytes) and noisy. Local MediaPaths is the reliable delivery. ...(media.paths.length ? { MediaPaths: media.paths, MediaTypes: media.types, - MediaUrls: media.urls, MediaPath: media.paths[0], MediaType: media.types[0], - MediaUrl: media.urls[0], } : {}), });