Guard against relative path wildcards and Linux root
This commit is contained in:
parent
0d2ab44974
commit
d40e20985d
3 changed files with 17 additions and 16 deletions
10
src/wiki.ts
10
src/wiki.ts
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue