(root: string, written: string)
| 54 | * written; null when it leaves the project. |
| 55 | */ |
| 56 | export function underWebRoot(root: string, written: string): string | null { |
| 57 | const target = path.posix.normalize(path.posix.join(root || '.', written)); |
| 58 | return target === '..' || target.startsWith('../') ? null : target; |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Each folder holding a file with a `$_SERVER['DOCUMENT_ROOT']` include → the |
no test coverage detected