[BUG] TMPDIR not quoted in init-plex-chown/run script

未關閉 適合新手
#458 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
1/5
預估耗時
1 小時以內
新手友好度
92/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
docker, shell

研究方向

開啟 root/etc/s6-overlay/s6-rc.d/init-plex-chown/run,並比較第 8 行未加引號的 TMPDIR 用法與第 6 行加上引號的用法。使用包含空格的 TMPDIR 路徑驗證指令碼;當 mkdir 能正確處理該路徑且不會建立錯誤的目錄時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

no-issue-activity

Current Behavior

In root/etc/s6-overlay/s6-rc.d/init-plex-chown/run, line 8 uses mkdir -p ${TMPDIR} without quoting the variable. While the default value (/run/plex-temp) doesn't contain spaces, if a user sets TMPDIR to a path with spaces, the mkdir command will fail or create the wrong directory.

Expected Behavior

TMPDIR should be quoted consistently, like it is on line 6 where rm -rf "${TMPDIR}" is used.

Steps To Reproduce

  1. Set TMPDIR=/path with spaces/plex-temp in docker create/run command
  2. Start the container
  3. The mkdir -p command will fail or create incorrect directories

Environment

  • OS: Any
  • How docker service was installed: Any
  • CPU architecture: x86-64 or arm64
  • Docker creation: Any docker create/run command with TMPDIR containing spaces

Container logs

N/A - this is a code quality issue

主要語言
Dockerfile
星號
1.4k
分支
228
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

linuxserver/docker-plex 的其他 Issue

查看 linuxserver/docker-plex 的全部 Issue

相似的 Issue

更多 DevOps Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。