From 0fa7650df8f940ed6b577d79836a78eb09726c4b Mon Sep 17 00:00:00 2001 From: louis Date: Sun, 12 Apr 2015 17:12:35 +0200 Subject: [PATCH] dont allow directory traversal #2 --- 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 ba45ab75..3b0be38c 100644 --- a/src/node/utils/Minify.js +++ b/src/node/utils/Minify.js @@ -165,7 +165,6 @@ function minify(req, res, next) var plugin = plugins.plugins[library]; var pluginPath = plugin.package.realPath; filename = path.relative(ROOT_DIR, pluginPath + libraryPath); - filename = filename.replace(/\\/g, '/'); // Windows (safe generally?) } else if (LIBRARY_WHITELIST.indexOf(library) != -1) { // Go straight into node_modules // Avoid `require.resolve()`, since 'mustache' and 'mustache/index.js'