1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Merge -pwfile semantics fix from 'pre-0.78'.

This commit is contained in:
Simon Tatham 2022-10-23 14:14:28 +01:00
commit 8b751c71c9
2 changed files with 7 additions and 3 deletions

View File

@ -87,9 +87,13 @@ SeatPromptResult cmdline_get_passwd_input(
/*
* We only handle prompts which don't echo (which we assume to be
* passwords), and (currently) we only cope with a password prompt
* that comes in a prompt-set on its own.
* that comes in a prompt-set on its own. Also, we don't use a
* command-line password for any kind of prompt which is destined
* for local use rather than to be sent to the server: the idea is
* to pre-fill _passwords_, not private-key passphrases (for which
* there are better alternatives available).
*/
if (p->n_prompts != 1 || p->prompts[0]->echo) {
if (p->n_prompts != 1 || p->prompts[0]->echo || !p->to_server) {
return SPR_INCOMPLETE;
}

View File

@ -989,7 +989,7 @@ static void ssh2_connection_process_queue(PacketProtocolLayer *ppl)
*/
if (ssh2_connection_need_antispoof_prompt(s)) {
s->antispoof_prompt = ssh_ppl_new_prompts(&s->ppl);
s->antispoof_prompt->to_server = true;
s->antispoof_prompt->to_server = false;
s->antispoof_prompt->from_server = false;
s->antispoof_prompt->name = dupstr("Authentication successful");
add_prompt(