ipx 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -95,7 +95,7 @@ const createFilesystemSource = (options) => {
95
95
  const rootDir = pathe.resolve(options.dir);
96
96
  return async (id) => {
97
97
  const fsPath = pathe.resolve(pathe.join(rootDir, id));
98
- if (!isValidPath(fsPath) || !fsPath.startsWith(rootDir)) {
98
+ if (!isValidPath(fsPath) || !fsPath.startsWith(rootDir + "/")) {
99
99
  throw createError("Forbidden path", 403, id);
100
100
  }
101
101
  let stats;
package/dist/index.mjs CHANGED
@@ -85,7 +85,7 @@ const createFilesystemSource = (options) => {
85
85
  const rootDir = resolve(options.dir);
86
86
  return async (id) => {
87
87
  const fsPath = resolve(join(rootDir, id));
88
- if (!isValidPath(fsPath) || !fsPath.startsWith(rootDir)) {
88
+ if (!isValidPath(fsPath) || !fsPath.startsWith(rootDir + "/")) {
89
89
  throw createError("Forbidden path", 403, id);
90
90
  }
91
91
  let stats;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ipx",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "repository": "unjs/ipx",
5
5
  "license": "MIT",
6
6
  "exports": {