diff --git a/lib/ace/static.js b/lib/ace/static.js index e9f69e6..b1ed540 100755 --- a/lib/ace/static.js +++ b/lib/ace/static.js @@ -31,6 +31,11 @@ if (allowSave) http.createServer(function(req, res) { var uri = unescape(url.parse(req.url).pathname); + if (path.normalize(unescape(req.url)) !== unescape(req.url)) { + res.statusCode = 403; + res.end(); + return; + } var filename = path.join(process.cwd(), uri); if (req.method == "OPTIONS") {