Skip to content

Harden shell command escaping and fix data storage bug#49

Open
niutech wants to merge 1 commit into
FreeterApp:masterfrom
niutech:code-audit
Open

Harden shell command escaping and fix data storage bug#49
niutech wants to merge 1 commit into
FreeterApp:masterfrom
niutech:code-audit

Conversation

@niutech

@niutech niutech commented Mar 2, 2026

Copy link
Copy Markdown
Contributor
  • In src/main/base/apps/terminal.ts, updated escBackslashesDblQuotes to escape $ and ` characters to prevent command injection in double-quoted strings.
  • In src/main/infra/dataStorage/fileDataStorage.ts, added the missing await keyword to the rm(filePath) call in deleteItem.
  • In src/main/infra/dataStorage/fileDataStorage.ts, updated setText to use the sanitized filePath variable instead of join(normStorageDirPath, key).

- In `src/main/base/apps/terminal.ts`, updated `escBackslashesDblQuotes`
  to escape `$` and `` ` `` characters to prevent command injection
  in double-quoted strings.
- In `src/main/infra/dataStorage/fileDataStorage.ts`, added the missing
  `await` keyword to the `rm(filePath)` call in `deleteItem`.
- In `src/main/infra/dataStorage/fileDataStorage.ts`, updated `setText`
  to use the sanitized `filePath` variable instead of `join(normStorageDirPath, key)`.

Co-authored-by: niutech <384997+niutech@users.noreply.github.com>
w1010k pushed a commit to w1010k/FreeterBySwh that referenced this pull request Jun 7, 2026
- 손상된 영구 상태(app/window) 검증 후 기본값으로 안전 폴백 (CHANGES FreeterApp#49)
- 새 위젯: D-Day — 멀티 디데이(라벨+날짜) + 날짜/요일 표시 토글 (CHANGES #51)
- 위젯 카운트 표시: To-Do 완료/전체, Note 단어/글자 수 (CHANGES FreeterApp#50)
- Top Bar 팝업 창 경계 클램프 + 리사이저 드래그 리스너 누수 정리 (CHANGES FreeterApp#48 후속)
- perf: workflowSwitcher copiedWorkflows 메모이제이션 (불필요 재계산 제거)
- test: useElementRect 단언을 toHaveTextContent로 정리
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