[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 天内回复