@hienlh/ppm 0.13.17 → 0.13.18
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.13.18] - 2026-04-25
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- **Windows path traversal rejection**: File tree lazy-loading and zip downloads failed on Windows hosts — `assertWithinProject` hardcoded `/` separator instead of `path.sep`
|
|
7
|
+
- **Upload response backslash paths**: Upload endpoint returned `input\file.jpg` on Windows instead of `input/file.jpg`, breaking frontend path matching
|
|
8
|
+
|
|
3
9
|
## [0.13.17] - 2026-04-25
|
|
4
10
|
|
|
5
11
|
### Fixed
|
|
@@ -71,4 +71,4 @@ This skill covers the `ppm` CLI, its HTTP API, and its config DB. It does **not*
|
|
|
71
71
|
- Third-party extensions (inspect via `ppm ext list`).
|
|
72
72
|
- The Claude Agent SDK internals (separate skill).
|
|
73
73
|
|
|
74
|
-
<!-- Generated for PPM v0.13.
|
|
74
|
+
<!-- Generated for PPM v0.13.18 at build time. Re-run `ppm export skill --install` to refresh. -->
|
|
@@ -201,4 +201,4 @@ _Base URL: `http://localhost:8080` (default; override via `ppm config set port <
|
|
|
201
201
|
- `ws://<host>/ws/terminal` — PTY terminal multiplexer
|
|
202
202
|
- `ws://<host>/ws/extensions` — extension host channel
|
|
203
203
|
|
|
204
|
-
<!-- Generated from src/server/routes/ for PPM v0.13.
|
|
204
|
+
<!-- Generated from src/server/routes/ for PPM v0.13.18 -->
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hono } from "hono";
|
|
2
|
-
import { resolve, basename } from "node:path";
|
|
2
|
+
import { resolve, basename, sep } from "node:path";
|
|
3
3
|
import { existsSync, statSync } from "node:fs";
|
|
4
4
|
import archiver from "archiver";
|
|
5
5
|
import { createDownloadToken } from "../../services/download-token.service.ts";
|
|
@@ -24,7 +24,7 @@ downloadRoutes.get("/zip", async (c) => {
|
|
|
24
24
|
if (!dirPath) return c.json(err("Missing query parameter: path"), 400);
|
|
25
25
|
|
|
26
26
|
const absPath = resolve(projectPath, dirPath);
|
|
27
|
-
if (!absPath.startsWith(projectPath +
|
|
27
|
+
if (!absPath.startsWith(projectPath + sep) && absPath !== projectPath) {
|
|
28
28
|
return c.json(err("Access denied"), 403);
|
|
29
29
|
}
|
|
30
30
|
if (!existsSync(absPath)) return c.json(err("Directory not found"), 404);
|
|
@@ -164,7 +164,7 @@ fileRoutes.post("/upload", async (c) => {
|
|
|
164
164
|
const absPath = resolve(absTargetDir, safeName);
|
|
165
165
|
if (!absPath.startsWith(projectPath)) return c.json(err("Access denied"), 403);
|
|
166
166
|
await Bun.write(absPath, file);
|
|
167
|
-
uploaded.push({ name: safeName, path: absPath.slice(projectPath.length + 1), size: file.size });
|
|
167
|
+
uploaded.push({ name: safeName, path: absPath.slice(projectPath.length + 1).split("\\").join("/"), size: file.size });
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
return c.json(ok({ uploaded }), 201);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
9
|
-
import { resolve, relative, join } from "node:path";
|
|
9
|
+
import { resolve, relative, join, sep } from "node:path";
|
|
10
10
|
import ignore, { type Ignore } from "ignore";
|
|
11
11
|
import type { FileEntry, FileDirEntry } from "../types/project.ts";
|
|
12
12
|
import { matchesGlob, resolveFilter } from "./file-filter.service.ts";
|
|
@@ -50,7 +50,7 @@ function loadGitignore(projectPath: string): Ignore {
|
|
|
50
50
|
|
|
51
51
|
function assertWithinProject(relPath: string, projectPath: string): void {
|
|
52
52
|
const abs = resolve(projectPath, relPath);
|
|
53
|
-
if (!abs.startsWith(projectPath +
|
|
53
|
+
if (!abs.startsWith(projectPath + sep) && abs !== projectPath) {
|
|
54
54
|
throw new SecurityError("Path traversal not allowed");
|
|
55
55
|
}
|
|
56
56
|
}
|