aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/files.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/files.js b/src/files.js
index 6c67539..747acf7 100644
--- a/src/files.js
+++ b/src/files.js
@@ -77,7 +77,7 @@ function removeBasePath(filePath) {
77} 77}
78 78
79function get(req, res, next) { 79function get(req, res, next) {
80 var filePath = req.params[0]; 80 var filePath = decodeURIComponent(req.params[0]);
81 var absoluteFilePath = getAbsolutePath(filePath); 81 var absoluteFilePath = getAbsolutePath(filePath);
82 if (!absoluteFilePath) return next(new HttpError(403, 'Path not allowed')); 82 if (!absoluteFilePath) return next(new HttpError(403, 'Path not allowed'));
83 83
@@ -145,7 +145,7 @@ function put(req, res, next) {
145} 145}
146 146
147function del(req, res, next) { 147function del(req, res, next) {
148 var filePath = req.params[0]; 148 var filePath = decodeURIComponent(req.params[0]);
149 var recursive = !!req.query.recursive; 149 var recursive = !!req.query.recursive;
150 var dryRun = !!req.query.dryRun; 150 var dryRun = !!req.query.dryRun;
151 151