Skip to content

Only allow scripting terminal changes on the terminal's own disks (1.21+) - #106

Merged
rubensworks merged 1 commit into
master-1.21-ltsfrom
claude/tender-heisenberg-1u9unz-1.21-lts
Nov 14, 2026
Merged

rubensworks merged 1 commit into
master-1.21-ltsfrom
claude/tender-heisenberg-1u9unz-1.21-lts

Conversation

@rubensworks

Copy link
Copy Markdown
Member

Fixes GHSA-mpph-9cpc-3hfq for master-1.21-lts and up.

The scripting terminal packets (modify, delete, rename and create script) carry a disk id from the client. The server applied them to that disk after only checking that the player has some scripting terminal open. On this branch, a rename also sends the resulting contents of both paths back to the player, so it could also be used to read scripts on other networks' disks.

ContainerTerminalScripting.setServerScript, renameServerScript and createNewServerScript now ignore disks that are not in the terminal's available disks.

The same fix for master-1.20-lts (without rename, which does not exist there) is in #105. When upmerging that PR, keep this branch's version of ContainerTerminalScripting.

Testing

  • New game test testTerminalScriptingIgnoresUnavailableDisks: modify, create and rename on a disk outside the terminal's network leave its scripts unchanged, and changes to the terminal's own disk still apply. Without the fix it fails (Expected scripts of the other disk to be {script0.js=original}, but was {script1.js=new, script2.js=, script0.js=modified}).
  • ./gradlew build (159 unit tests) and ./gradlew runGameTestServer (28 game tests) pass.

Generated by Claude Code

The script modify, delete, rename and create packets carry a disk id from
the client, and the server applied them to that disk without checking
that the disk is part of the terminal's network. A rename also sent the
contents of the scripts at both paths back to the player. The server now
ignores disks that are not in the terminal's available disks.

Fixes GHSA-mpph-9cpc-3hfq

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UeSuG5REz2JxHTZADcGhh2
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 42258007241

Coverage increased (+0.5%) to 44.317%

Details

  • Coverage increased (+0.5%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 31 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

31 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
org/cyclops/integratedscripting/inventory/container/ContainerTerminalScripting.java 31 44.93%

Coverage Stats

Coverage Status
Relevant Lines: 4226
Covered Lines: 2022
Line Coverage: 47.85%
Relevant Branches: 1986
Covered Branches: 731
Branch Coverage: 36.81%
Branches in Coverage %: Yes
Coverage Strength: 23.81 hits per line

💛 - Coveralls

@rubensworks
rubensworks merged commit 5a3fa8c into master-1.21-lts Nov 14, 2026
23 checks passed
@rubensworks
rubensworks deleted the claude/tender-heisenberg-1u9unz-1.21-lts branch November 14, 2026 14:18
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