Fix directory traversal fixing RegExp
parent
a1a1017bfe
commit
7557af3db7
|
@ -100,7 +100,7 @@ async.waterfall([
|
||||||
{
|
{
|
||||||
res.header("Server", serverName);
|
res.header("Server", serverName);
|
||||||
var filePath = path.normalize(__dirname + "/.." +
|
var filePath = path.normalize(__dirname + "/.." +
|
||||||
req.url.replace(/\./g, '').split("?")[0]);
|
req.url.replace(/\.\./g, '').split("?")[0]);
|
||||||
res.sendfile(filePath, { maxAge: exports.maxAge });
|
res.sendfile(filePath, { maxAge: exports.maxAge });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue