Fix pathexists filepath back to posix
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Build and Push Docker Image / build (push) Waiting to run
Integration Test / build and test (push) Waiting to run
Run Unit Tests / Run Unit Tests (push) Waiting to run

This commit is contained in:
advplyr 2025-06-11 16:37:07 -05:00
parent dc6783ea76
commit 22f6e86a12

View file

@ -113,7 +113,8 @@ class FileSystemController {
return res.sendStatus(403)
}
const filepath = Path.join(libraryFolder.path, directory)
let filepath = Path.join(libraryFolder.path, directory)
filepath = fileUtils.filePathToPOSIX(filepath)
// Ensure filepath is inside library folder (prevents directory traversal)
if (!filepath.startsWith(libraryFolder.path)) {