Skip to content

Fix Mosh password prompts with ConPTY controls#1000

Merged
binaricat merged 1 commit into
mainfrom
codex/fix-989-mosh-conpty-password
May 18, 2026
Merged

Fix Mosh password prompts with ConPTY controls#1000
binaricat merged 1 commit into
mainfrom
codex/fix-989-mosh-conpty-password

Conversation

@binaricat
Copy link
Copy Markdown
Owner

Summary

  • Strip invisible terminal control sequences before matching Mosh SSH password/passphrase prompts.
  • Add a regression test for a Windows ConPTY-style password prompt that visually ends in password: but carries a cursor-control suffix.

Fixes #989.

Validation

  • node --test electron/bridges/terminalBridge.moshHandshakeSession.test.cjs --test-name-pattern "ConPTY" failed before the fix and passes after it.
  • node --test electron/bridges/terminalBridge.moshHandshakeSession.test.cjs electron/bridges/moshHandshake.test.cjs electron/bridges/terminalBridge.bareMoshClient.test.cjs electron/bridges/sshAuthHelper.kbdInteractive.test.cjs
  • npm test
  • git diff --check

Notes

This replaces PR #999, which was closed because the issue author confirmed the visible prompt is a normal English password: prompt.

@binaricat
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@binaricat binaricat marked this pull request as ready for review May 18, 2026 07:44
@binaricat binaricat merged commit b7ec3c1 into main May 18, 2026
16 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.

Bug: mosh协议的自动登录功能失效了

1 participant