mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
sanitize path from URL
This commit is contained in:
parent
1fc4db9e84
commit
d720d7365a
@ -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