mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
In merging the username and password input functions I inadvertently
removed the support for control characters in passwords. Replaced. [originally from svn r2900]
This commit is contained in:
parent
000acf446c
commit
8aa463b7a1
8
ssh.c
8
ssh.c
@ -2203,7 +2203,13 @@ static int process_userpass_input(Ssh ssh, unsigned char *in, int inlen)
|
|||||||
return -1;
|
return -1;
|
||||||
break;
|
break;
|
||||||
default:
|
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))
|
((unsigned char) c >= 160))
|
||||||
&& ssh->userpass_input_bufpos < ssh->userpass_input_buflen-1) {
|
&& ssh->userpass_input_bufpos < ssh->userpass_input_buflen-1) {
|
||||||
ssh->userpass_input_buffer[ssh->userpass_input_bufpos++] = c;
|
ssh->userpass_input_buffer[ssh->userpass_input_bufpos++] = c;
|
||||||
|
Loading…
Reference in New Issue
Block a user