From 9d4e5f6e35153129377206ef545d4965afae627d Mon Sep 17 00:00:00 2001 From: John McLear Date: Fri, 10 Apr 2015 22:02:22 +0100 Subject: [PATCH] dont allow directory traversal --- src/node/utils/Minify.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/node/utils/Minify.js b/src/node/utils/Minify.js index da101f8d..ba45ab75 100644 --- a/src/node/utils/Minify.js +++ b/src/node/utils/Minify.js @@ -145,7 +145,6 @@ function minify(req, res, next) filename = path.normalize(path.join(ROOT_DIR, filename)); if (filename.indexOf(ROOT_DIR) == 0) { filename = filename.slice(ROOT_DIR.length); - filename = filename.replace(/\\/g, '/'); // Windows (safe generally?) } else { res.writeHead(404, {}); res.end();