diff --git a/serveJsdoc.js b/serveJsdoc.js index 15238f8c..6fff61e7 100644 --- a/serveJsdoc.js +++ b/serveJsdoc.js @@ -4,6 +4,11 @@ var http = require("http"), fs = require("fs") http.createServer(function(request, response) { + if (path.normalize(decodeURI(request.url)) !== decodeURI(request.url)) { + response.statusCode = 403; + response.end(); + return; + } var uri = url.parse(request.url).pathname var filename = path.join(process.cwd(), 'out', uri)