Guard against relative path wildcards and Linux root

This commit is contained in:
mtkennerly 2020-10-18 10:11:35 -04:00
parent 0d2ab44974
commit d40e20985d
3 changed files with 17 additions and 16 deletions

View file

@ -331,6 +331,16 @@ export function pathIsTooBroad(path: string): boolean {
return true;
}
// Root:
if (path === "/") {
return true;
}
// Relative path wildcard:
if (path.startsWith("*")) {
return true;
}
return false;
}