fix: enforce inbound media max-bytes during remote fetch

This commit is contained in:
Peter Steinberger
2026-02-21 23:02:17 +01:00
parent dd41fadcaf
commit 73d93dee64
10 changed files with 207 additions and 77 deletions

View File

@@ -319,6 +319,7 @@ export async function resolveMedia(
url,
fetchImpl,
filePathHint: filePath,
maxBytes,
});
const originalName = fetched.fileName ?? filePath;
return saveMediaBuffer(fetched.buffer, fetched.contentType, "inbound", maxBytes, originalName);