From 45b7cafca491c01fb0e76ca5e39a7d3ed401996e Mon Sep 17 00:00:00 2001 From: Chad Weider Date: Tue, 28 Feb 2012 18:29:23 -0800 Subject: [PATCH] Don't let filenames be changed to Windows' backslash-notation. --- node/utils/Minify.js | 1 + 1 file changed, 1 insertion(+) diff --git a/node/utils/Minify.js b/node/utils/Minify.js index 04371851c..98eb6f926 100644 --- a/node/utils/Minify.js +++ b/node/utils/Minify.js @@ -57,6 +57,7 @@ exports.minify = function(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();