[BUG] occ wrapper does not preserve arguments containing spaces
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 75/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- bash, docker
- 領域
- cli
研究方向
找到透過 bash -c 執行 php /app/www/public/occ 的 occ 包裝器,並檢查它如何傳遞引數。報告指出 $* 是引數拆分的原因,並建議在呼叫 OCC 時保留原始引數界線。當包含空格的值作為一個引數傳遞到 OCC 時,即為完成;該 issue 沒有指定測試或檔案。
由索引模型根據 Issue 內容生成。
描述
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
The occ wrapper uses $* when passing arguments to php occ through bash -c:
sudo -u abc -s /bin/bash -c "php /app/www/public/occ $*"
This causes arguments containing spaces to lose their original argument boundaries when expanded and interpreted by the inner shell.
As a result, commands that pass a single argument containing spaces may behave incorrectly because the argument gets split into multiple arguments.
Expected Behavior
The wrapper should preserve the original argument boundaries, including arguments containing spaces, quotes, and special characters.
Using "$@" instead of $* would preserve the individual arguments. Ideally, the additional bash -c invocation should also be avoided.
For example:
sudo -u abc -- php /app/www/public/occ "$@"
Steps To Reproduce
- Run the LinuxServer Nextcloud container.
- Execute an OCC command with an argument containing spaces:
occ config:app:set myapp setting --value="hello world"
- Observe that the argument is split into multiple arguments when passed to the underlying OCC command.
- Compare with the expected behaviour, where hello world should be passed as a single argument.
Environment
- OS: debian trixie
- How docker service was installed: https://get.docker.com
CPU architecture
arm64
Docker creation
not relevant
Container logs
not relevant
- 主要語言
- Dockerfile
- 星號
- 898
- 分支
- 143
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
linuxserver/docker-nextcloud 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 48/100
linuxserver/docker-nextcloud#551 · 4 則留言 ·
-
[BUG] High CPU usage at random moments可能已有人在做 @mauro2306 於 87 天前認領。 未關閉no-issue-activity
難度 5/5 一週以上 新手友好度 30/100
linuxserver/docker-nextcloud#539 · 43 則留言 · 4 個 reaction ·
查看 linuxserver/docker-nextcloud 的全部 Issue
相似的 Issue
-
photos.mjs fetch: a fetch where every id fails still writes assets/img/credits.json and prints the "wrote to" banner可能已有人在做 @shuhuNB515 今天認領。 未關閉
難度 1/5 1 小時以內 新手友好度 88/100
Leonxlnx/taste-skill#228 ·
維護者通常 3 天內回覆
-
area:tui enhancement platform:macos
難度 2/5 1-3 小時 新手友好度 68/100
anthropics/claude-code#112838 ·
-
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 4 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆
-
P2
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆