mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-21 00:26:01 +02:00
Fix pathexists filepath back to posix
This commit is contained in:
parent
dc6783ea76
commit
22f6e86a12
1 changed files with 2 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue