Internal
Public Access
Fix connect-time username prompt never reaching SSH/RDP authentication
The username entered at the connect-time prompt (added for issue #21) was updating SessionTab's own in-memory Profile copy, but SshSessionBackend/RdpSessionBackend are constructed with -- and only ever read from -- their own separate Profile copy on a worker thread, which never saw that edit. Authentication was still built from the original (blank) username regardless of what was typed into the prompt. SessionConnectOptions gains a username field, populated by SessionTab on every connect attempt and threaded through the same way password already is; both backends now prefer options.username over profile().username. Covered by a new SSH regression test using an exact-match fixture host that only succeeds for a specific user@host target. Bump version to v2026.9.16.5. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -193,6 +193,22 @@ Delivered:
|
||||
told the user to go edit the profile instead of ever prompting inline.
|
||||
Removed; connect-time prompting is now the only username gate for
|
||||
SSH/RDP
|
||||
- Even with the three checks above gone, a username entered at the
|
||||
connect-time prompt still never actually reached SSH or RDP
|
||||
authentication: `SshSessionBackend`/`RdpSessionBackend` are constructed
|
||||
with their own `Profile` copy up front (moved to a worker thread) and
|
||||
read `profile().username` directly, which never sees `SessionTab`'s
|
||||
later edit to its own in-memory profile once the user answers the
|
||||
prompt. `SessionConnectOptions` (which already carries `password` the
|
||||
same way) gained a `username` field, populated by `SessionTab` from
|
||||
its profile copy on every connect attempt; both backends now prefer
|
||||
`options.username` over `profile().username` when building the actual
|
||||
connect target/auth call. Covered by a new SSH regression test
|
||||
(`tests/fixtures/fake_ssh.sh`'s `requireuser` host only accepts an
|
||||
exact `prompted-user@requireuser` target, so the test fails unless the
|
||||
option, not the stale profile copy, is actually used) -- RDP has no
|
||||
equivalent fake-server test harness, so that side relies on mirroring
|
||||
the already-tested `m_activeOptions.password` pattern exactly
|
||||
- Robustness fix: an unrecognized `FramebufferUpdate` rectangle encoding
|
||||
used to abort the connection generically; `kAnnouncedEncodings` is now
|
||||
the single source of truth for what `SetEncodings` announces and what
|
||||
|
||||
Reference in New Issue
Block a user