diff --git a/packages/backend/src/server/proxy/proxy-media.ts b/packages/backend/src/server/proxy/proxy-media.ts index b116b4b961..aba08bb805 100644 --- a/packages/backend/src/server/proxy/proxy-media.ts +++ b/packages/backend/src/server/proxy/proxy-media.ts @@ -19,6 +19,7 @@ export async function proxyMedia(ctx: Koa.Context) { const { mime, ext } = await detectType(path); + if (!mime.startsWith('image/')) throw 403; if (!FILE_TYPE_BROWSERSAFE.includes(mime)) throw 403; let image: IImage;