Add deterministic YouTube matching and fix download path guard
This commit is contained in:
@@ -26,7 +26,7 @@ export class UtilsService {
|
|||||||
const resolvedCandidate = resolve(candidatePath);
|
const resolvedCandidate = resolve(candidatePath);
|
||||||
const rel = relative(root, resolvedCandidate);
|
const rel = relative(root, resolvedCandidate);
|
||||||
|
|
||||||
if (rel === '' || (!rel.startsWith('..') && !resolve(rel).startsWith('/'))) {
|
if (rel === '' || (!rel.startsWith('..') && !relative('', rel).startsWith('..'))) {
|
||||||
return resolvedCandidate;
|
return resolvedCandidate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user