We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32caf99 commit 95e2b0dCopy full SHA for 95e2b0d
lib/utils.js
@@ -42,9 +42,10 @@ function validateFilePath(userPath, rootDir) {
42
try {
43
const path = require('path');
44
const resolved = path.resolve(rootDir, userPath);
45
+ const rootWithSeparator = path.resolve(rootDir) + path.sep;
46
return {
47
path: resolved,
- isSecure: resolved.startsWith(rootDir)
48
+ isSecure: resolved.startsWith(rootWithSeparator)
49
};
50
} catch {
51
return { path: null, isSecure: false };
0 commit comments