diff --git a/src/server/proxy/proxy-media.ts b/src/server/proxy/proxy-media.ts index 357715bb9202..84d30b04a4c9 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)) {