Skip to content

Commit

Permalink
image以外はproxyしないように (misskey-dev#5051)
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Jun 21, 2019
1 parent e274c73 commit 2c2de12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server/proxy/proxy-media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 2c2de12

Please sign in to comment.