mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Fix mishandling of user abort during SSH-1 auth.
If the user presses ^C or ^D at an authentication prompt, I meant to handle that by calling ssh_user_close, i.e. treat the closure as being intentionally directed _by_ the user, and hence don't bother putting up a warning box telling the user it had happened. I got this right in ssh2userauth, but in ssh1login I mistakenly called ssh_sw_abort instead. That's what I get for going through all the subtly different session closures in a hurry trying to decide which of five categories each one falls into...
This commit is contained in:
parent
cb6fa5fff6
commit
f22d442003
@ -712,7 +712,8 @@ static void ssh1_login_process_queue(PacketProtocolLayer *ppl)
|
||||
}
|
||||
if (!s->userpass_ret) {
|
||||
/* Failed to get a passphrase. Terminate. */
|
||||
ssh_sw_abort(s->ppl.ssh, "Unable to authenticate");
|
||||
ssh_user_close(s->ppl.ssh,
|
||||
"User aborted at passphrase prompt");
|
||||
return;
|
||||
}
|
||||
passphrase = dupstr(s->cur_prompt->prompts[0]->result);
|
||||
@ -968,7 +969,7 @@ static void ssh1_login_process_queue(PacketProtocolLayer *ppl)
|
||||
* because one was supplied on the command line
|
||||
* which has already failed to work). Terminate.
|
||||
*/
|
||||
ssh_sw_abort(s->ppl.ssh, "Unable to authenticate");
|
||||
ssh_user_close(s->ppl.ssh, "User aborted at password prompt");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user