Skip to content

Commit

Permalink
Temporary fix of regex verification
Browse files Browse the repository at this point in the history
  • Loading branch information
dfquaresma committed May 29, 2019
1 parent c44fd48 commit caa101c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middlewares/pathResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = (req, res, next) => {
const providedPath = req.query.path || '';
const absolutePath = path.resolve(userRootPath, providedPath);

const userOriginPathRegex = new RegExp(`^${userRootPath}`);
const userOriginPathRegex = new RegExp(`${userRootPath}`);
if (!absolutePath.match(userOriginPathRegex)) {
const err = new Error('Unauthorized access');
err.status = 403;
Expand Down

0 comments on commit caa101c

Please sign in to comment.