Skip to content

Quote Windows beam arguments - #17

Merged
dominicletz merged 3 commits into
masterfrom
fix/quote-windows-beam-args
Nov 1, 2026
Merged

dominicletz merged 3 commits into
masterfrom
fix/quote-windows-beam-args

Conversation

@dominicletz

@dominicletz dominicletz commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Quote each beam_args and forwarded_argv value on the Windows cmd.exe /c line so a ddrive:// query that contains & stays one argument.

Test plan

  • Launch the host with a forwarded URL ddrive://chat/abc?message=hello&thread_root=root and confirm the beam process receives the full URL.

Made with Cursor


Note

Low Risk
Narrow change to how the host formats the beam child-process command line; improves correctness for special characters without touching auth or RPC.

Reviewed by Cursor Bugbot for commit 5defd64. Configure here.

cmd.exe splits an unquoted ddrive:// link on &.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because on-demand usage is turned off. To enable Bugbot Autofix, turn on on-demand usage and set a spend limit in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5defd64. Configure here.

Comment thread native/windows/src/host_controller.cpp Outdated
for (auto& a : config_.beam_args) cmd << ' ' << a;
for (auto& a : config_.forwarded_argv) cmd << ' ' << a;
for (auto& a : config_.beam_args) cmd << ' ' << quote_cmd_arg(a);
for (auto& a : config_.forwarded_argv) cmd << ' ' << quote_cmd_arg(a);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quoted args break cmd.exe launch

High Severity

Quoting each beam_args and forwarded_argv value after cmd.exe /c plus a quoted script puts more than two quotes on the line. cmd.exe then strips the first and last quote, which garbles the batch path and leaves & in a forwarded URL outside quotes.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5defd64. Configure here.

cmd.exe /c drops quotes when start and a protocol URL are both quoted.
A percent sign in the temp cmd file is expanded, and the link would stay on disk.
@dominicletz
dominicletz merged commit 872e94e into master Nov 1, 2026
4 checks passed
@dominicletz
dominicletz deleted the fix/quote-windows-beam-args branch November 1, 2026 20:54
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