X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/fd7a4aad03f198efffa89a25751f1c10b2c6a7c8..0ec4b50ff9d82409f851ea04b6587c42f97f1bdb:/ssh.c?ds=sidebyside diff --git a/ssh.c b/ssh.c index 9f7d1925..5bea36b9 100644 --- a/ssh.c +++ b/ssh.c @@ -2203,7 +2203,13 @@ static int process_userpass_input(Ssh ssh, unsigned char *in, int inlen) return -1; break; default: - if (((c >= ' ' && c <= '~') || + /* + * This simplistic check for printability is disabled + * when we're doing password input, because some people + * have control characters in their passwords.o + */ + if ((!ssh->userpass_input_echo || + (c >= ' ' && c <= '~') || ((unsigned char) c >= 160)) && ssh->userpass_input_bufpos < ssh->userpass_input_buflen-1) { ssh->userpass_input_buffer[ssh->userpass_input_bufpos++] = c;