Commit 94ff5399 authored by Johannes Zellner's avatar Johannes Zellner

URI decode all paths

parent 5d361bf9
......@@ -77,7 +77,7 @@ function removeBasePath(filePath) {
}
function get(req, res, next) {
var filePath = req.params[0];
var filePath = decodeURIComponent(req.params[0]);
var absoluteFilePath = getAbsolutePath(filePath);
if (!absoluteFilePath) return next(new HttpError(403, 'Path not allowed'));
......@@ -145,7 +145,7 @@ function put(req, res, next) {
}
function del(req, res, next) {
var filePath = req.params[0];
var filePath = decodeURIComponent(req.params[0]);
var recursive = !!req.query.recursive;
var dryRun = !!req.query.dryRun;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment