We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e64d49 commit 03d4bb6Copy full SHA for 03d4bb6
server/routes/imageproxy.ts
@@ -32,6 +32,18 @@ function initTvdbImageProxy() {
32
33
router.get('/:type/*', async (req, res) => {
34
const imagePath = req.path.replace(/^\/\w+/, '');
35
+
36
+ if (
37
+ !imagePath.startsWith('/') ||
38
+ imagePath.startsWith('//') ||
39
+ imagePath.includes('://')
40
+ ) {
41
+ logger.error('Invalid image path detected', {
42
+ imagePath: imagePath.slice(0, 200),
43
+ });
44
+ return res.status(400).send('Invalid image path');
45
+ }
46
47
try {
48
let imageData;
49
if (req.params.type === 'tmdb') {
0 commit comments