mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-20 12:34:45 +02:00
sshd session will not echo password in an app/program run within sshd session
Fixes problem #143 ; Turning off echo does not work. Now "net use" to mount a drive or sftp, scp, run within a ssh session will not echo password.
This commit is contained in:
parent
91adb0c99b
commit
4ed811fdb4
@ -2511,6 +2511,10 @@ channel_input_data(int type, u_int32_t seq, void *ctxt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// avoid echoing if echo is tuned off by the current running application
|
||||||
|
DWORD dwGlobalConsoleMode;
|
||||||
|
GetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), &dwGlobalConsoleMode);
|
||||||
|
if (dwGlobalConsoleMode & (ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT))
|
||||||
buffer_append(&c->input, data, data_len);
|
buffer_append(&c->input, data, data_len);
|
||||||
charinline += data_len; // one more char on the line
|
charinline += data_len; // one more char on the line
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user