revert changes fixed by prior PR

This commit is contained in:
Vito0912 2025-06-12 00:14:02 +02:00
parent d0e091f659
commit 67e0a6a945
No known key found for this signature in database
GPG Key ID: 29A3D509FE70B237

View File

@ -134,7 +134,7 @@ class FileSystemController {
filepath = fileUtils.filePathToPOSIX(filepath) filepath = fileUtils.filePathToPOSIX(filepath)
// Ensure filepath is inside library folder (prevents directory traversal) (And convert libraryFolder to Path to normalize) // Ensure filepath is inside library folder (prevents directory traversal) (And convert libraryFolder to Path to normalize)
if (!filepath.startsWith(Path.join(libraryFolder.path))) { if (!filepath.startsWith(libraryFolder.path)) {
Logger.error(`[FileSystemController] Filepath is not inside library folder: ${filepath}`) Logger.error(`[FileSystemController] Filepath is not inside library folder: ${filepath}`)
return res.sendStatus(400) return res.sendStatus(400)
} }