Skip to content

Commit

Permalink
Powershell ignores password property of the configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
sk-keeper committed Oct 29, 2024
1 parent bb7cae4 commit bd88fe1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
9 changes: 0 additions & 9 deletions Cli/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,6 @@ public static async Task LoginToKeeper(AuthSync auth, IInputManager inputManager
passwds.AddRange(passwords);
}

var uc = auth.Storage.Users.Get(email);
if (!string.IsNullOrEmpty(uc?.Password))
{
if (!passwds.Contains(uc.Password))
{
passwds.Add(uc.Password);
}
}

await auth.Login(email, passwds.ToArray());
if (!auth.IsCompleted)
{
Expand Down
7 changes: 0 additions & 7 deletions Commander/NotConnectedCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,6 @@ private async Task DoLogin(LoginOptions options)
{
passwords.Add(options.Password);
}

var uc = _auth.Storage.Users.Get(username);
if (!string.IsNullOrEmpty(uc?.Password))
{
passwords.Add(uc.Password);
}

await Utils.LoginToKeeper(_auth, Program.GetInputManager(), username, passwords.ToArray());
}

Expand Down
5 changes: 5 additions & 0 deletions KeeperSdk/auth/AuthSync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ public async Task Login(string username, params string[] passwords)
if (string.IsNullOrEmpty(password)) continue;
_loginContext.PasswordQueue.Enqueue(password);
}
var uc = Storage.Users.Get(username);
if (!string.IsNullOrEmpty(uc?.Password))
{
_loginContext.PasswordQueue.Enqueue(uc.Password);
}

await DoLogin(username);
}
Expand Down

0 comments on commit bd88fe1

Please sign in to comment.