mirror of
https://github.com/zoriya/flood.git
synced 2026-06-04 03:27:15 +00:00
server: torrents: ensure path is allowed when mediainfo is requested
This commit is contained in:
@@ -668,6 +668,9 @@ router.get('/:hash/mediainfo', async (req, res) => {
|
||||
}
|
||||
|
||||
const contentPath = fs.existsSync(path.join(directory, name)) ? path.join(directory, name) : directory;
|
||||
if (!isAllowedPath(contentPath)) {
|
||||
callback(null, accessDeniedError());
|
||||
}
|
||||
|
||||
try {
|
||||
const mediainfoProcess = childProcess.execFile(
|
||||
|
||||
Reference in New Issue
Block a user