Repository navigation
Test control: the token stays out of games and tools the launcher starts - #571
Merged
Merged
Conversation
The launcher read RECOMPLAUNCHER_TEST_CONTROL and its port but left them in its environment, so every game, recomp, emulator, setup script and tool it started inherited the token. Both are now read once at the very start, kept in the launcher, and taken out of its environment. Only the launcher's own start again without Steam's libraries (Linux) gets them back; an update's restart doesn't.
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.
Follows up #548.
The launcher read
RECOMPLAUNCHER_TEST_CONTROL(and_PORT) but left them in its own environment, so every game, recomp or mod from GitHub, emulator, setup script, ReShade tool and its own restart inherited the token, and could drive the launcher over MCP with it (run JS in the window, install/uninstall, screenshots).test_control::take_from_env()runs first thing inrun(), before any thread starts: it reads both variables once, keeps them in aOnceLock, and removes them from the environment.test_control::startuses the kept values.sysenv::prepare_start, whichexecs the launcher again) is still the start the tester asked for, so it gets the two variables back explicitly on that one command. An update's restart doesn't: it's a new build, and test control stays off until it's started with the token again.Tests (test_control): the variables are gone from
std::envafter the take and the kept values still give the rightwanted; a program started after the take doesn't see the token (cmd /C set/env); the own restart gets the kept token and nothing else.