Skip to content

feat(setup): project folder, media verify step, presets in UI/URL, ChatGPT app label - #4

Closed
seungwonme wants to merge 2 commits into
mainfrom
feat/project-folder-verify
Closed

seungwonme wants to merge 2 commits into
mainfrom
feat/project-folder-verify

Conversation

@seungwonme

@seungwonme seungwonme commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #3. #3 was merged before the project folder / verify / preset commit was pushed, so this PR carries that commit onto main. (The yt-dlp --skip-dependencies option and the Windows helper pruning already landed in #3.)

Summary

  • Project folder item (Windows + macOS): zip URL + folder name + optional SHA-256. HTTPS only (redirects must stay HTTPS), SHA-256 verified when given, per-entry zip path check (no zip-slip), extracts to Documents/<name>; an existing folder is never overwritten (<name>-YYYYMMDD, or skip with a message). No downloaded file is executed. Folder names: letters, digits, ., _, -.
  • Verify step when a media tool is selected: per-tool Korean summary (installed + version / failed + what to do), ffmpeg -filters must contain drawtext, ending with "ChatGPT 앱을 완전히 종료한 뒤 다시 열어 주세요". The .bat stays ASCII-only: Korean is emitted as \uXXXX escapes decoded by PowerShell (KR). macOS uses plain UTF-8 Korean.
  • UI: preset buttons (기본 개발 환경 / AI 에이전트 개발 / 영상 수업), project fields, URL ?os=win&preset=video-class&project=<zip>&name=<folder>[&sha256=]; copy-link emits the short form when the selection matches a preset.
  • codex-app id is unchanged. Windows label "ChatGPT desktop app (includes Codex)" / "ChatGPT 데스크톱 앱 (Codex 포함)" (Store 9PLM9XGG6VKS); macOS UI keeps "Codex App".

Notes

  • Windows uses [Environment]::GetFolderPath('MyDocuments') (fallback %USERPROFILE%\Documents).
  • Not verified on real Windows. PowerShell functions were exercised on PowerShell 7 / macOS with a stubbed download.
  • Merge deploys the public site: needs approval.

Verification

pnpm test, pnpm build, pnpm test:e2e (10 tests) pass.

Security fix (automated review finding)

  • ps() now doubles ASCII ' and the typographic single quotes U+2018, U+2019, U+201A, U+201B, which PowerShell also treats as quote delimiters. This covers every free-text setting, not only the project fields.
  • Project values are validated before they are emitted, for both Windows and macOS output: URL must match https:// plus RFC 3986 characters only (no quotes of any kind, backticks, spaces, backslashes, braces, non-ASCII), folder name ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$, SHA-256 64 hex digits or empty. Invalid values omit the step entirely and the UI shows an error (role="alert"). An empty URL ignores the other fields.
  • bash path: sh() single-quote escaping was already sound (bash only treats ASCII ' specially) and is now also behind the validation.
  • Tests: payloads such as https://x/a’;calc;’, curly-quote names, ;, $(calc), backticks, spaces, newlines, non-ASCII, plus an e2e test on a crafted shared link.

@seungwonme

Copy link
Copy Markdown
Member Author

Scope reduced by owner; only the quoting fix is kept in a separate PR

@seungwonme seungwonme closed this Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant