1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/terminal
Simon Tatham edd5e13ffc Fix assertion failure on Restart Session.
This occurred if the SSH server closed the connection for any
reason (in practice usually a timeout, but reproducible more easily by
manually killing a test server process) while the user was in the
middle of any kind of interactive prompt-based login in the GUI PuTTY
terminal (be it simple password, k-i, private key passphrase,
whatever).

The problem was that term->userpass_state wasn't cleaned up when the
connection died, and then if you started a fresh SSH session in the
same terminal, the attempt to create a new term->userpass_state would
find there was one already there.

The simplest place to insert the missing cleanup is the call to
term_provide_backend(), because that's a terminal API function which
is already called to notify the terminal that one backend has gone
away and the next one has turned up.

(In fact, it's called twice, once to set term->backend to NULL when
the first session closes, and again when the session is restarted. I
see no harm in making the cleanup unconditional, not bothering to tell
the difference between the two cases.)
2024-12-14 11:48:10 +00:00
..
bidi_gettype.c Make bidi type enums into list macros. 2021-10-10 14:55:15 +01:00
bidi_test.c bidi_test: minor memory fixes. 2022-01-29 18:25:34 +00:00
bidi.c Update to Unicode 15. 2022-11-11 08:44:07 +00:00
bidi.h Test rig for the new bidi algorithm. 2021-10-10 15:00:30 +01:00
lineedit.c New centralised version of local line editing. 2023-03-04 13:55:50 +00:00
terminal.c Fix assertion failure on Restart Session. 2024-12-14 11:48:10 +00:00
terminal.h Fix comment about LE_EOF_ALWAYS. 2024-11-24 12:37:31 +00:00