v1.17.0 breaks Positron connections: single-quoted `--url` in ProxyCommand reaches the CLI literally ("Premature close")
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 70/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- shell, typescript, vscode
- 領域
- devtools
調査の方向性
バグは、拡張機能が生成するSSH設定に ProxyCommand 行をどのように書き込むかにあります。デプロイURLがシングルクォートでシェル用にクォートされている箇所を見つけ、Issueによれば既に動作している既存のパスのクォート処理と比較してください。生成された ProxyCommand 文字列を単体テストがカバーしているか確認し、URLを対象にテストを拡張してください。URLがクォートなし、またはダブルクォートで出力され、既存のパスのクォート処理が変わらず、テストが通れば完了です。
索引モデルが issue の本文から書いたものです。
説明
Regression in v1.17.0; v1.16.4 works. Positron 1.134.0, macOS arm64, Coder v2.34.1.
Every Positron connection fails within ~100 ms:
[Trace] Spawning ProxyCommand: …/coder-darwin-arm64 --token= --url 'https://coder.example.com' --use-keyring=true ssh --disable-autostart --stdio …
[Error] Error resolving authority
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
VS Code (Microsoft Remote-SSH) and plain ssh from a terminal work with the same generated config.
Cause
v1.17.0 POSIX-shell-quotes the URL in the ProxyCommand (--url 'https://…'); v1.16.4 wrote it bare. Positron's built-in open-remote-ssh doesn't run ProxyCommand through a shell: it tokenizes the ssh_config value (honoring double quotes only) and calls child_process.spawn(cmd, args). The CLI therefore gets the quotes literally and exits at flag parsing:
invalid argument "'https://coder.example.com'" for "--url" flag: parse "'https://coder.example.com'": first path segment in URL cannot contain colon
open-remote-ssh discards the child's stderr, so the user sees only "Premature close". Other editors built on open-remote-ssh are presumably affected the same way.
Workaround
Install v1.16.4 and turn off auto-update for the extension. There's no settings-level workaround: coder.sshConfig can't override ProxyCommand, and the conf file is rewritten on every connect.
Suggested fix
Quote the URL the way the paths already are (bare when it matches the safe character set, double quotes otherwise). Since 1.17.0 already rejects deployment URLs containing shell metacharacters, the single quotes don't add safety, and double quotes parse correctly in both OpenSSH and open-remote-ssh.
- 主要言語
- TypeScript
- スター
- 132
- フォーク
- 48
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 29
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/vscode-coder のほかの issue
-
ReconnectingWebSocket drops messages the server sends right after the handshake対応中かも @EhabY が 3 日前に担当しました。 オープンbug vs-code
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
coder/vscode-coder#1141 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Split commands.ts by topic対応中かも @EhabY が 3 日前に担当しました。 オープンImprovement tech-debt vs-code
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
coder/vscode-coder#1135 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Design the VS Code Workspaces panel再び着手できるかも @chrifro が 30 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
coder/vscode-coder#1113 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
bug upstream
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
coder/vscode-coder#1087 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Improvement tech-debt vs-code
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
coder/vscode-coder#1066 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
coder/vscode-coder の issue をすべて見る
似ている issue
-
streams:add
難易度 2/5 1時間未満 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/rocketmq-dashboard#6872 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
interledger/publisher-tools#931 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
ARTPARK-SAHAI-ORG/calibrate-frontend#727 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
fab-geocommuns/RNB-site#539 ·
メンテナーはふだん 2 日以内に返信