Skip to content

fix(launch): resolve Start/Resume + harden shell opens - #252

Closed
TheMrBakit wants to merge 1 commit into
qrrk:masterfrom
TheMrBakit:fix/security-and-game-launch
Closed

TheMrBakit wants to merge 1 commit into
qrrk:masterfrom
TheMrBakit:fix/security-and-game-launch

Conversation

@TheMrBakit

Copy link
Copy Markdown
Contributor

Summary

  • Windows game launch was broken — the Start and Resume buttons did nothing. Root causes fixed:
    • FS.list_dir() returns bare filenames, so the previous cmd /C "start <bare.exe> ..." had no resolvable path and silently failed. Now launches via OS.create_process with the full exe path (Paths.game_dir.path_join(matches[0])).
    • Replaced the cmd /C string with an argument array, so world names containing spaces/quotes can't be reinterpreted as shell syntax.
    • Added --basepath <game_dir>/ so Cataclysm finds its data/ directory (Godot's OS.create_process cannot set a working dir, which the old cd /d game_dir provided).
  • Security hardening: replaced OS.shell_open(...) with Helpers.safe_shell_open(...) across call sites (links, game dir, user dir, install paths) to prevent shell injection via crafted URLs/paths.
  • Renamed tex_solzrized_light.tres → tex_Solarized_Light.tres (case fix).

Verification

  • godot --headless --check passes (no script/parse errors).
  • Export succeeds; rebuilt exe launches Cataclysm normally.

Known caveat (not a launcher bug)

On a locally-built Cataclysm-BN (914eab6-dirty), passing --world <name> via CLI crashes the game (access violation). This build dies on the --world flag specifically; loading the same world from the in-game Load menu works. The launcher now emits a correct --world argument — the crash is game-side and independent of this change. Resume will crash on that build until the game's --world CLI path is fixed upstream.

Files changed

14 files, +134/−49 (GDScript, scene, icon rename). No .import/cache churn included.

🤖 Generated with Hermes Agent

- Windows game launch now passes the FULL exe path (FS.list_dir returns bare filenames) and launches via OS.create_process argument array instead of a cmd /C string, fixing Start/Resume buttons that silently did nothing.
- Add --basepath so Cataclysm finds its data/ dir (OS.create_process has no cwd), replacing the old 'cd /d game_dir' behaviour.
- Replace OS.shell_open with Helpers.safe_shell_open across call sites to avoid shell-injection via crafted URLs/paths.
- Rename tex_solzrized_light.tres -> tex_Solarized_Light.tres (case fix).
@TheMrBakit

TheMrBakit commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Closing didn't finish the fixes

@TheMrBakit TheMrBakit closed this Jul 22, 2026
@TheMrBakit
TheMrBakit deleted the fix/security-and-game-launch branch July 22, 2026 20:37
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.

2 participants