mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
Merge pull request +13343 from c9/standalone-fix-security-m10
sanitize path from URL
This commit is contained in:
commit
2433da1f70
@ -176,7 +176,7 @@ function plugin(options, imports, register) {
|
||||
|
||||
api.get("/update/:path*", function(req, res, next) {
|
||||
var filename = req.params.path;
|
||||
var path = resolve(__dirname + "/../../build/output/" + filename);
|
||||
var path = resolve(__dirname + "/../../build/output/" + resolve("/" + filename));
|
||||
|
||||
var stream = fs.createReadStream(path);
|
||||
stream.on("error", function(err) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user