diff --git a/server/routes/imageproxy.ts b/server/routes/imageproxy.ts index ac2fbe08..ede3e83e 100644 --- a/server/routes/imageproxy.ts +++ b/server/routes/imageproxy.ts @@ -32,6 +32,12 @@ function initTvdbImageProxy() { router.get('/:type/*', async (req, res) => { const imagePath = req.path.replace(/^\/\w+/, ''); + + if (imagePath.startsWith('//') || imagePath.includes('://')) { + logger.error('Invalid URL for image proxy', { imagePath }); + return res.status(403).send('Invalid URL for image proxy'); + } + try { let imageData; if (req.params.type === 'tmdb') {