ipx 2.1.0 → 2.1.1

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/cli.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  const listhen = require('listhen');
4
4
  const citty = require('citty');
5
5
  const cli = require('listhen/cli');
6
- const nodeFs = require('./shared/ipx.7601f01b.cjs');
6
+ const nodeFs = require('./shared/ipx.02bbed4c.cjs');
7
7
  require('defu');
8
8
  require('ufo');
9
9
  require('h3');
@@ -15,7 +15,7 @@ require('ofetch');
15
15
  require('pathe');
16
16
 
17
17
  const name = "ipx";
18
- const version = "2.1.0";
18
+ const version = "2.1.1";
19
19
  const description = "High performance, secure and easy-to-use image optimizer.";
20
20
 
21
21
  const serve = citty.defineCommand({
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { listen } from 'listhen';
2
2
  import { defineCommand, runMain } from 'citty';
3
3
  import { getArgs, parseArgs } from 'listhen/cli';
4
- import { c as createIPX, g as ipxFSStorage, i as ipxHttpStorage, e as createIPXNodeServer } from './shared/ipx.b027cc1c.mjs';
4
+ import { c as createIPX, g as ipxFSStorage, i as ipxHttpStorage, e as createIPXNodeServer } from './shared/ipx.e4d5b25d.mjs';
5
5
  import 'defu';
6
6
  import 'ufo';
7
7
  import 'h3';
@@ -13,7 +13,7 @@ import 'ofetch';
13
13
  import 'pathe';
14
14
 
15
15
  const name = "ipx";
16
- const version = "2.1.0";
16
+ const version = "2.1.1";
17
17
  const description = "High performance, secure and easy-to-use image optimizer.";
18
18
 
19
19
  const serve = defineCommand({
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const nodeFs = require('./shared/ipx.7601f01b.cjs');
3
+ const nodeFs = require('./shared/ipx.02bbed4c.cjs');
4
4
  const h3 = require('h3');
5
5
  require('defu');
6
6
  require('ufo');
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { c as createIPX, b as createIPXH3App, a as createIPXH3Handler, e as createIPXNodeServer, f as createIPXPlainServer, d as createIPXWebServer, g as ipxFSStorage, i as ipxHttpStorage } from './shared/ipx.b027cc1c.mjs';
1
+ export { c as createIPX, b as createIPXH3App, a as createIPXH3Handler, e as createIPXNodeServer, f as createIPXPlainServer, d as createIPXWebServer, g as ipxFSStorage, i as ipxHttpStorage } from './shared/ipx.e4d5b25d.mjs';
2
2
  import { createError } from 'h3';
3
3
  import 'defu';
4
4
  import 'ufo';
@@ -699,7 +699,7 @@ function ipxFSStorage(_options = {}) {
699
699
  const fs = await _getFS();
700
700
  for (const dir of dirs) {
701
701
  const filePath = pathe.join(dir, id);
702
- if (!isValidPath(filePath) || !filePath.startsWith(dir)) {
702
+ if (!isValidPath(filePath) || !filePath.startsWith(dir + "/")) {
703
703
  throw h3.createError({
704
704
  statusCode: 403,
705
705
  statusText: `IPX_FORBIDDEN_PATH`,
@@ -692,7 +692,7 @@ function ipxFSStorage(_options = {}) {
692
692
  const fs = await _getFS();
693
693
  for (const dir of dirs) {
694
694
  const filePath = join(dir, id);
695
- if (!isValidPath(filePath) || !filePath.startsWith(dir)) {
695
+ if (!isValidPath(filePath) || !filePath.startsWith(dir + "/")) {
696
696
  throw createError({
697
697
  statusCode: 403,
698
698
  statusText: `IPX_FORBIDDEN_PATH`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ipx",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "repository": "unjs/ipx",
5
5
  "description": "High performance, secure and easy-to-use image optimizer.",
6
6
  "license": "MIT",