(root: string, path: string)
| 181 | } |
| 182 | |
| 183 | function isInside(root: string, path: string): boolean { |
| 184 | const rel = relative(root, path); |
| 185 | return rel === "" || (!rel.startsWith("..") && !isAbsolute(rel)); |
| 186 | } |
| 187 | |
| 188 | async function resolveConfinedPath(root: string, input: string): Promise<string> { |
| 189 | if (!input || input.includes("\0") || isAbsolute(input)) { |
no outgoing calls
no test coverage detected