mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 19:18:26 +00:00
fix: enforce inbound media max-bytes during remote fetch
This commit is contained in:
@@ -447,7 +447,7 @@ async function handleImageMessage(
|
||||
if (photo) {
|
||||
try {
|
||||
const maxBytes = mediaMaxMb * 1024 * 1024;
|
||||
const fetched = await core.channel.media.fetchRemoteMedia({ url: photo });
|
||||
const fetched = await core.channel.media.fetchRemoteMedia({ url: photo, maxBytes });
|
||||
const saved = await core.channel.media.saveMediaBuffer(
|
||||
fetched.buffer,
|
||||
fetched.contentType,
|
||||
|
||||
Reference in New Issue
Block a user