server: torrents: returns when access denied in /mediainfo

Fixes: ebb4927b
This commit is contained in:
Jesse Chan
2020-12-07 01:44:52 +08:00
parent 516628f8e1
commit 57e6227310
+1
View File
@@ -679,6 +679,7 @@ router.get(
const contentPath = fs.existsSync(path.join(directory, name)) ? path.join(directory, name) : directory;
if (!isAllowedPath(contentPath)) {
callback(null, accessDeniedError());
return;
}
try {