Skip to content

Add quotes to prevent potential word splittings#3816

Open
zzmic wants to merge 1 commit intoBeyondDimension:developfrom
zzmic:word-split-fix
Open

Add quotes to prevent potential word splittings#3816
zzmic wants to merge 1 commit intoBeyondDimension:developfrom
zzmic:word-split-fix

Conversation

@zzmic
Copy link
Copy Markdown

@zzmic zzmic commented Mar 9, 2026

As the title suggests, this PR includes the commit that adds quotes to several commands in build/linux/online_install.sh and build/linux/uninstall.sh to prevent potential word splittings (related to https://www.shellcheck.net/wiki/SC2086). For instance, rm -rf $tar_path is risky because tar_path is derived from base_path, which in turn comes from user input via zenity. If the user enters a path containing spaces, the unquoted variable could be split into multiple arguments, causing the command to behave unexpectedly.

如下为翻译:正如标题所示,本次PR包含在build/linux/online_install.shbuild/linux/uninstall.sh中为多个命令添加引号的提交,以防止潜在的单词分割问题(与https://www.shellcheck.net/wiki/SC2086相关)。例如,rm -rf $tar_path 存在风险,因为 tar_pathbase_path 派生而来,而后者又来自用户通过 zenity 输入的路径。若用户输入的路径包含空格,未加引号的变量可能被拆分为多个参数,导致命令行为异常。

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