]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
In merging the username and password input functions I inadvertently
authorSimon Tatham <anakin@pobox.com>
Fri, 28 Feb 2003 20:28:03 +0000 (20:28 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 28 Feb 2003 20:28:03 +0000 (20:28 +0000)
removed the support for control characters in passwords. Replaced.

[originally from svn r2900]

ssh.c

diff --git a/ssh.c b/ssh.c
index 9f7d19258faa165fb7afe475c7c4c7a3d71f110b..5bea36b9c34df480ab7551c8ad5da2373f9f5535 100644 (file)
--- 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;