Fix quote-stripping bug in OpenerLauncher.splitCommand breaking openers with shell-sanitized values - #529
Draft
angryziber with Copilot wants to merge 4 commits into
Draft
Fix quote-stripping bug in OpenerLauncher.splitCommand breaking openers with shell-sanitized values#529angryziber with Copilot wants to merge 4 commits into
angryziber with Copilot wants to merge 4 commits into
Conversation
Co-authored-by: angryziber <882016+angryziber@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
angryziber
September 1, 2026 06:25
View session
Co-authored-by: angryziber <882016+angryziber@users.noreply.github.com>
…m build glob Co-authored-by: angryziber <882016+angryziber@users.noreply.github.com>
Co-authored-by: angryziber <882016+angryziber@users.noreply.github.com>
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 #528.
Root cause
The 3.10 release added
sanitizeForShell(security hardening against shell injection), which wraps every substituted opener value (e.g.${fetcher.ip}) in single quotes before it's inserted into the opener command string. On non-Linux platforms, the resulting string is split into process arguments viaRuntime.exec(splitCommand(openerString)).splitCommand's quote-handling logic assumed a quoted token always spans across at least one embedded space, so after finding a token that starts with a quote character, it always tried to consume an additional token viatokenizer.nextToken(quoteChar)to locate the closing quote.For simple values with no embedded whitespace (e.g. an IP address wrapped as
'192.168.1.1'), the entire quoted token is already returned in full by the initial whitespace-basednextTokencall. The subsequent lookup for the closing quote then reads past the actual value (into whatever text follows, or throws and is silently swallowed), leaving a stray, un-stripped trailing quote character in the argument (e.g.192.168.1.1'instead of192.168.1.1). This corrupted virtually every opener command using a fetcher value on Windows/macOS non-terminal launches, exactly as reported in #528.Fix
When a whitespace-delimited token already starts and ends with the same quote character (and is longer than 1 character), unwrap it directly instead of falling into the old multi-token-consuming logic that assumed the quotes were separated by whitespace.
Testing
OpenerLauncherTest.testCommandSplittingcovering single- and double-quoted, whitespace-free tokens (matching the patternsanitizeForShellproduces).OpenerLauncherTestcases still pass (including the deliberately-malformed-quote fallback case).FileFeederTest.simpleHostnamesfailure remains (confirmed present on the base branch too, before this change).code_reviewandcodeql_checkerboth ran clean.