-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
GetPassword is broken #392
Comments
It seems you know what needs to be fixed. Would you mind raising a pull request? |
Re:
I'd rather keep the API until .NET actually deprecates. I know there has been discussion about doing so, but as of .NET 5 this API is still not officially marked as |
Sorry for the late response, yes I do know the fix (the example I linked fixes it). But it is a different approach and I would recommend someone test both approaches to see if there are any negatives of my approach in comparison. Although my version fixes this issue, I'm not sure if it introduces any other issues. |
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please comment if you believe this should remain open, otherwise it will be closed in 14 days. Thank you for your contributions to this project. |
Closing due to inactivity. |
I noticed that a bot closed this, but this is still an open/active issue. I don't use your library so I haven't been motivated to open a pull request, but all the info on how to fix it was provided for someone willing. |
My stance on this is here #485. I can reopen the issue, but the bot will just close again in a year if no one comes forward to implement a fix. |
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please comment if you believe this should remain open, otherwise it will be closed in 14 days. Thank you for your contributions to this project. |
Closing due to inactivity. |
GetPassword
is broken"\b \b"
will not move up lines in the console, so if the input currently spans multiple lines your backspace breaks (will not back space to previous lines in the console).Delete
,Left
/Right
Arrow,Home
, orEnd
. Or theCTRL
modifier.2.
and keys likeF1
throughF12
it is adding'\0'
char
s to the resultingstring
.'*'
character.ConsoleColor
parameters or a prompt on the method? Let other code handle that.SecureString
is obsolete in.NET Core
, so you should probably not include that in packages that target frameworks other than.NET Framework
.Example fixes
I have written my own version of this method that fixes topics
1.-5.
from above:Source Code
Example Code
Also, I mentioned that topic
5.
from above should be handled by other means than optional parameters on every relevant method; here is an example of a better approach in my opinion:Source Code
There are example usages in the same file as the source code.
The text was updated successfully, but these errors were encountered: