Merge branch 'master' of git://github.com/Pita/etherpad-lite

This commit is contained in:
Mark Schmale 2011-09-02 14:12:06 +02:00
commit 9fbaddd0c3

View file

@ -99,7 +99,8 @@ async.waterfall([
app.get('/static/*', function(req, res)
{
res.header("Server", serverName);
var filePath = path.normalize(__dirname + "/.." + req.url.split("?")[0]);
var filePath = path.normalize(__dirname + "/.." +
req.url.replace(/\.\./g, '').split("?")[0]);
res.sendfile(filePath, { maxAge: exports.maxAge });
});