Skip to content

orchard vnc: percent-encode credentials in the vnc:// URL - #525

Merged
yzhuang-oai merged 1 commit into
openai:mainfrom
RaphaelFakhri:fix-vnc-url-credentials
Oct 30, 2026
Merged

yzhuang-oai merged 1 commit into
openai:mainfrom
RaphaelFakhri:fix-vnc-url-credentials

Conversation

@RaphaelFakhri

Copy link
Copy Markdown
Contributor

Summary

orchard vnc vm and orchard vnc worker formatted the vnc:// URL with fmt.Sprintf and didn't escape the username and password. A password such as p/ss produced vnc://admin:p/ss@127.0.0.1:<port>, which URL parsers read as host admin:p, so the VNC client couldn't connect. # and ? move the rest of the URL into the fragment or the query.

This change builds the URL with net/url, so the credentials are percent-encoded. The printed (sanitized) URL and the existing behavior for empty credentials stay the same, except that vm no longer adds a trailing : when the password is empty.

Testing

  • go test -count=1 -v ./internal/command/vnc/: TestNewVNCURL and TestNewVNCURLEscapesCredentials pass. With the previous formatting logic, TestNewVNCURLEscapesCredentials fails on p/ss.
  • golangci-lint run ./internal/command/vnc/... (v2.14.0) reports no new issues.

Fixes #524

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T12:12:45.188936Z a0ac873 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@yzhuang-oai
yzhuang-oai merged commit 005a480 into openai:main Oct 30, 2026
3 checks passed
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.

orchard vnc opens a broken URL when the password contains reserved URL characters

2 participants