Skip to content

fix(security): keep screenshot filenames literal in shell hooks - #27

Merged
ghptc merged 2 commits into
masterfrom
fix/security-screenshot-filenames
Oct 27, 2026
Merged

ghptc merged 2 commits into
masterfrom
fix/security-screenshot-filenames

Conversation

@ghptc

@ghptc ghptc commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Player-derived screenshot basenames previously retained shell substitution characters even though the optional Unix screenshot hook double-quotes its filename argument. When an operator configures that hook and requests a screenshot, those bytes can influence shell evaluation as the engine user.

Restrict basenames to portable literal ASCII letters, digits, underscore and hyphen. Other characters become underscores. Hook program/path remains trusted operator configuration; this is a focused filename fix, not a general shell sandbox.

Validation: actual sanitizer plus harmless printf-only local shell regression, full engine80 tests (one optional skip), independent security review approved focused source/local scope. See docs/security/screenshot-hook.md. No production hook or exploit invoked; no production changes. Await mandatory Linux/Windows CI and manual owner review; do not merge or deploy automatically.

@ghptc
ghptc marked this pull request as ready for review October 27, 2026 19:19
@ghptc
ghptc merged commit e367a3a into master Oct 27, 2026
2 checks passed
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