mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-14 01:16:52 +02:00
Fix pathexists filepath back to posix
This commit is contained in:
parent
dc6783ea76
commit
22f6e86a12
@ -113,7 +113,8 @@ class FileSystemController {
|
|||||||
return res.sendStatus(403)
|
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)
|
// Ensure filepath is inside library folder (prevents directory traversal)
|
||||||
if (!filepath.startsWith(libraryFolder.path)) {
|
if (!filepath.startsWith(libraryFolder.path)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user