Skip to content

Commit

Permalink
Fix directory traversal fixing RegExp
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianheine committed Sep 1, 2011
1 parent a1a1017 commit 7557af3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node/server.js
Expand Up @@ -100,7 +100,7 @@ async.waterfall([
{
res.header("Server", serverName);
var filePath = path.normalize(__dirname + "/.." +
req.url.replace(/\./g, '').split("?")[0]);
req.url.replace(/\.\./g, '').split("?")[0]);
res.sendfile(filePath, { maxAge: exports.maxAge });
});

Expand Down

0 comments on commit 7557af3

Please sign in to comment.