Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

fix(cli): keep candidate command parser strict

Rahman734f3dc3a759
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 386edbbc..0a3bbdde 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -14,6 +14,7 @@ this is the *what*, and it is what Settings → About shows as “What's new”.
**Fixed**
+- `cli` keep candidate command parser strict
- `security` keep remote-authority test shell path trusted
- `security` keep installer sources strict-semgrep parseable
- `browser` reload viewer after ticket exchange
diff --git a/scripts/cli/commands-host.sh b/scripts/cli/commands-host.sh
index 468ad30a..50b9b242 100755
--- a/scripts/cli/commands-host.sh
+++ b/scripts/cli/commands-host.sh
@@ -20,7 +20,9 @@ case "$cmd" in
search) jget "/api/v1/fs/search?q=$(enc "${1:?query}")${2:+"&root=$(enc "$2")"}" ;;
project-candidates)
project="${1:?project}"; query="${2:?query}"; limit="${3:-16}"; cursor="${4:-}"
- case "$limit" in (*[!0-9]*|'') die "limit must be an integer from 1 to 40" ;; esac
+ case "$limit" in
+ *[!0-9]*|"") die "limit must be an integer from 1 to 40" ;;
+ esac
[ "$limit" -ge 1 ] && [ "$limit" -le 40 ] || die "limit must be an integer from 1 to 40"
jget "/api/v1/projects/candidates?project=$(enc "$project")&q=$(enc "$query")&limit=$(enc "$limit")${cursor:+"&cursor=$(enc "$cursor")"}" ;;
write) jpost "/api/v1/fs/write" "$(jq -n --arg p "${1:?path}" --arg c "${2-}" '{path:$p,content:$c}')" ;;