Skip to content

Commit

Permalink
[FIX] Path traversal sanitizing request path
Browse files Browse the repository at this point in the history
  • Loading branch information
Mik317 authored Aug 21, 2020
1 parent 56b51bd commit c4c0f01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nodeserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ function start(config) {
host = conf.serv[key];
}
}
var nowTemp = host.frondend + (request.url.replace('/', '') || host.baseTemp);

var nowTemp = (host.frondend + (request.url.replace('/', '') || host.baseTemp)).replace(/\.\./g, '');
var httpHead = header(nowTemp);
conf.app = conf.getApp(host.backend);
if(!host) {
Expand Down

0 comments on commit c4c0f01

Please # to comment.