Emergency patch

This commit is contained in:
Calvin Montgomery 2013-07-20 18:02:08 +02:00
parent 0c26f68f1c
commit 212fae9fc8
1 changed files with 3 additions and 0 deletions

View File

@ -94,6 +94,9 @@ var Server = {
// default path
this.app.get("/:thing(*)", function (req, res, next) {
while(req.params.thing.indexOf("%25") != -1)
req.params.thing = decodeURIComponent(req.params.thing);
req.params.thing = decodeURIComponent(req.params.thing);
var root = __dirname + "/www/",
answer = path.resolve (__dirname + "/www/", req.params.thing);
if (answer.indexOf (root) != 0)