This commit is contained in:
Matthieu
2026-03-31 17:57:59 +02:00
parent 1b1dab65b6
commit 476060cf7d
45 changed files with 8547 additions and 648 deletions

View File

@@ -27,6 +27,10 @@ class DocumentStorageService
public function getAbsolutePath(string $relativePath): string
{
if (str_contains($relativePath, '..')) {
throw new RuntimeException(sprintf('Path traversal detected: "%s"', $relativePath));
}
$absolutePath = $this->storageDir.'/'.$relativePath;
$realPath = realpath($absolutePath);