diff --git a/src/server/proxy/proxy-media.ts b/src/server/proxy/proxy-media.ts index e16665f6cd..4535a0fb5d 100644 --- a/src/server/proxy/proxy-media.ts +++ b/src/server/proxy/proxy-media.ts @@ -17,6 +17,8 @@ export async function proxyMedia(ctx: Koa.BaseContext) { const [type, ext] = await detectMine(path); + if (!type.startsWith('image/')) throw 403; + let image: IImage; if ('static' in ctx.query && ['image/png', 'image/gif'].includes(type)) {