Skip to content

fix: use proper quoting for exe paths and args on Windows - #50075

Merged
codebytere merged 1 commit into
40-x-yfrom
trop/40-x-y-bp-fix-use-proper-quoting-for-exe-paths-and-args-on-windows-1772643603550
Mar 5, 2026
Merged

codebytere merged 1 commit into
40-x-yfrom
trop/40-x-y-bp-fix-use-proper-quoting-for-exe-paths-and-args-on-windows-1772643603550

Conversation

@trop

@trop trop Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Backport of #50016

See that PR for details.

Notes: none

Previously, GetProtocolLaunchPath and FormatCommandLineString in
browser_win.cc used naive quoting which could break when paths or
arguments contained backslashes, spaces, or embedded quotes.

Fix by extracting the CommandLineToArgvW-compatible quoting logic from
relauncher_win.cc into a shared utility and use it in both browser_win.cc
and relauncher_win.cc to properly quote the exe path and each argument
individually.

Co-authored-by: Shelley Vohr <[email protected]>
@trop
trop Bot requested review from a team and codebytere March 4, 2026 17:01
@trop trop Bot added 40-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Mar 4, 2026
@codebytere
codebytere merged commit 60951cd into 40-x-y Mar 5, 2026
242 of 247 checks passed
@release-clerk

release-clerk Bot commented Mar 5, 2026

Copy link
Copy Markdown

No Release Notes

@codebytere
codebytere deleted the trop/40-x-y-bp-fix-use-proper-quoting-for-exe-paths-and-args-on-windows-1772643603550 branch March 5, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

40-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant