implement ReadLineSecure(), fix #7

This commit is contained in:
Carson McManus 2017-05-22 17:45:49 -04:00
parent d514a4546d
commit 5018803889
2 changed files with 4 additions and 4 deletions

View file

@ -180,7 +180,7 @@ namespace SteamGuard
while (!passKeyValid) while (!passKeyValid)
{ {
Console.WriteLine("Please enter encryption password: "); Console.WriteLine("Please enter encryption password: ");
passKey = Console.ReadLine(); passKey = Utils.ReadLineSecure();
if (passKey == "") if (passKey == "")
continue; continue;
passKeyValid = this.VerifyPasskey(passKey); passKeyValid = this.VerifyPasskey(passKey);
@ -212,9 +212,9 @@ namespace SteamGuard
do do
{ {
Console.Write("Enter" + (inAccountSetupProcess ? " " : " new ") + "passkey: "); Console.Write("Enter" + (inAccountSetupProcess ? " " : " new ") + "passkey: ");
newPassKey = Console.ReadLine(); newPassKey = Utils.ReadLineSecure();
Console.Write("Confirm" + (inAccountSetupProcess ? " " : " new ") + "passkey: "); Console.Write("Confirm" + (inAccountSetupProcess ? " " : " new ") + "passkey: ");
confirmPassKey = Console.ReadLine(); confirmPassKey = Utils.ReadLineSecure();
if (newPassKey != confirmPassKey) if (newPassKey != confirmPassKey)
{ {

View file

@ -324,7 +324,7 @@ namespace SteamGuard
username = Console.ReadLine(); username = Console.ReadLine();
} }
Console.Write("Password: "); Console.Write("Password: ");
var password = Console.ReadLine(); var password = Utils.ReadLineSecure();
UserLogin login = new UserLogin(username, password); UserLogin login = new UserLogin(username, password);
string emailCode = null, twoFactorCode = null; string emailCode = null, twoFactorCode = null;