Repository navigation
Only allow scripting terminal changes on the terminal's own disks (1.21+) - #106
Merged
rubensworks merged 1 commit intoNov 14, 2026
Merged
Conversation
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
Coverage Report for CI Build 42258007241Coverage increased (+0.5%) to 44.317%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions31 previously-covered lines in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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,renameServerScriptandcreateNewServerScriptnow 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
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