detunized / password-manager-access

Password Manager Access for .NET in C#
MIT License
38 stars 8 forks source link

1Password: ArgumentNullException in Duo #123

Closed detunized closed 5 months ago

detunized commented 5 months ago

Seems like in

        internal static DuoDevice[] ParseDeviceData(R.Data data)
        {
            return data.Phones
                .Select(x => new DuoDevice(id: x.Id, name: x.Name, GetDeviceFactors(x.Key, data.Methods)))
                .ToArray();
        }

R.Data.Phones is null. Figure out how this could have happened.

System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
   at PasswordManagerAccess.Duo.DuoV4.ParseDeviceData(Data data)
   at PasswordManagerAccess.Duo.DuoV4.GetDevices(String sessionId, RestClient rest)
   at PasswordManagerAccess.Duo.DuoV4.Authenticate(String authUrl, IDuoUi ui, IRestTransport transport)
   at PasswordManagerAccess.OnePassword.Client.AuthenticateWithDuo(SecondFactor factor, IUi ui, RestClient rest)
   at PasswordManagerAccess.OnePassword.Client.GetSecondFactorResult(SecondFactor factor, Credentials credentials, IUi ui, RestClient rest)
   at PasswordManagerAccess.OnePassword.Client.PerformSecondFactorAuthentication(SecondFactor[] factors, Credentials credentials, AesKey sessionKey, IUi ui, ISecureStorage storage, RestClient rest)
   at PasswordManagerAccess.OnePassword.Client.LoginAttempt(Credentials credentials, AppInfo app, IUi ui, ISecureStorage storage, RestClient rest)
   at PasswordManagerAccess.OnePassword.Client.LogIn(Credentials credentials, AppInfo app, IUi ui, ISecureStorage storage, RestClient rest)
   at PasswordManagerAccess.OnePassword.Client.LogIn(Credentials credentials, AppInfo app, IUi ui, ISecureStorage storage, IRestTransport transport)
   at PasswordManagerAccess.OnePassword.Client.LogIn(Credentials credentials, AppInfo app, IUi ui, ISecureStorage storage)