diff --git a/server.js b/server.js index 6da1972..ab105a3 100644 --- a/server.js +++ b/server.js @@ -6,6 +6,11 @@ var http = require("http"), 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 , filename = path.join(process.cwd(), uri);