diff --git a/App.js b/App.js index 4f280d2..0f01a57 100644 --- a/App.js +++ b/App.js @@ -198,6 +198,11 @@ const routing = { }; let httpserver, port = 8080; httpserver = http.createServer((req, res) => { + if (path.normalize(decodeURI(req.url)) !== decodeURI(req.url)) { + res.statusCode = 403; + res.end(); + return; + } let host, body = url.parse(req.url, true); let query = body.query; let pathname = body.pathname;