Skip to content

v2.0.1

Choose a tag to compare

@ZhangZuoqian ZhangZuoqian released this 28 Sep 15:43
· 13 commits to main since this release

Security fix: shell command injection eliminated

  • Removed the /bin/sh -c / cmd.exe /c wrapper layer: user input is never handed to any shell interpreter
  • Commands are tokenized with shlex.split(); unclosed quotes return a format error and nothing is executed; empty commands are rejected
  • Blacklist / allowlist are matched against the real program name (cmd_list[0]), not the raw input string; config fields blacklist / allowlist / enforce_allowlist unchanged
  • Executed via subprocess.Popen(cmd_list, shell=False); streaming output, per-command timeout with automatic kill, stderr capture and audit log fully preserved; status markers [INFO] / [OK] / [FAIL]

Breaking change

In-game commands no longer support shell built-in syntax (pipes, redirections, wildcards, ;, &&, ||, $(), backticks). For complex logic, write a shell script, put it in the allowlist and run it by name. See README.


⚠️ 该版本已停止分发(含旧版执行策略,游戏内执行未默认禁用)。请使用 v2.1.0。