-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Use Of Non-ASCII Character In SSH Client Passwords #322
Conversation
- Modified readpassphrase() to read unicode characters and return utf8-encoded password strings to allow use of non-ascii characters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been longing to rewrite this logic for a while.
My proposal is to do the following:
- Save current console settings
- Modify console settings to echo off and line mode (SetConsoleMode(ENABLE_LINE_INPUT)
- ReadFile(CONIN)
- Revert console settings
Thoughts?
Topically, I think that could work although messing with console mode can sometimes have some unforeseen consequences. I haven't written many console programs that dynamically ask for input so I don't have a strong knowledge base about what those might be. The only immediate questions/concerns that come to mind are:
|
Hmm. Right. My proposal would only support a specific use case of readpassphrase and has unintended consequences. Let me review your changes. |
@manojampalam I hadn't noticed this before, but apparently when compiling under Visual Studio 2017 vice Visual Studio 2015 (and/or against the latest Windows 10 SDK), the current readpassphrase() truncates its output to the first character. This change also happens to address that behavior and, other than setting ENABLE_PKCS11 as a processor definition, is literally the only other thing I had to do to get PKCS11 support working. Any chance to review these changes? |
Apologies for the delay. I'm still looking into Unix implementation and checking how best we can support all the different modes. |
@manojampalam Thoughts on moving forward with this? |
Can we merge this in with as part of the 8.1 release? (rebase needed first) |
Addresses: PowerShell/Win32-OpenSSH#1178
May be related to: PowerShell/Win32-OpenSSH#1084