@astralkit/cli 4.6.1 → 4.6.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/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to the `@astralkit/cli` package.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [4.6.2] — 2026-10-14
9
+
10
+ ### Fixed
11
+ - Install Next.js catch-all and optional catch-all routes used by authentication boosters. Dots within route names no longer trigger the directory-traversal guard.
12
+ - Continue rejecting parent-directory traversal with either slash convention, absolute paths, Windows drive-relative paths and null bytes. Existing route files remain preserved by create-if-missing merges.
13
+
8
14
  ## [4.6.1] — 2026-10-11
9
15
 
10
16
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astralkit/cli",
3
- "version": "4.6.1",
3
+ "version": "4.6.2",
4
4
  "description": "AstralKit CLI — Install and manage UI components in your project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -97,8 +97,12 @@ export function isSafePath(basedir, filepath) {
97
97
  */
98
98
  export function isSafeInstallDir(cwd, requestedDir) {
99
99
  if (typeof requestedDir !== 'string' || !requestedDir) return false;
100
- if (path.isAbsolute(requestedDir)) return false;
101
- if (requestedDir.includes('..')) return false;
100
+ // Check both separator conventions on every host. Next.js catch-all route
101
+ // names contain dots ([[...slug]]), but only a complete '..' segment is
102
+ // traversal. Reject drive-relative paths too (C:foo on Windows).
103
+ if (path.posix.isAbsolute(requestedDir) || path.win32.isAbsolute(requestedDir)) return false;
104
+ if (/^[a-z]:/i.test(requestedDir) || requestedDir.includes('\0')) return false;
105
+ if (requestedDir.split(/[\\/]/).includes('..')) return false;
102
106
  const resolved = path.resolve(cwd, requestedDir);
103
107
  const relative = path.relative(cwd, resolved);
104
108
  return !relative.startsWith('..') && !path.isAbsolute(relative);