mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 07:05:35 +03:00
[PM-7255] Fix autofill cancelling the request producing inconsistent behavior (#3230)
* PM-7255 Fix autofill cancelling the request on password autofill because of wrong safeguard * PM-7255 Clear code no longer used
This commit is contained in:
parent
dee9524b2c
commit
477b1cca44
2 changed files with 6 additions and 8 deletions
|
@ -328,11 +328,6 @@ namespace Bit.iOS.Autofill
|
|||
}
|
||||
}
|
||||
|
||||
private bool CanProvideCredentialOnPasskeyRequest(CipherView cipherView)
|
||||
{
|
||||
return _context.PasskeyCredentialRequest != null && !cipherView.Login.HasFido2Credentials;
|
||||
}
|
||||
|
||||
private void OnConfirmingNewCredential()
|
||||
{
|
||||
MainThread.BeginInvokeOnMainThread(() =>
|
||||
|
|
|
@ -443,14 +443,17 @@ namespace Bit.iOS.Autofill
|
|||
return;
|
||||
}
|
||||
|
||||
var decCipher = await cipher.DecryptAsync();
|
||||
|
||||
if (!CanProvideCredentialOnPasskeyRequest(decCipher))
|
||||
if (_context.IsPasskey)
|
||||
{
|
||||
// this shouldn't happen but as a safeguard we've set it here:
|
||||
// if somehow the flow got into here then it's impossible to find the credential identity
|
||||
// i.e. if on iOS < 17 and somehow there is a PasskeyCredentialRequest that was passed along in the iOS callbacks
|
||||
CancelRequest(ASExtensionErrorCode.CredentialIdentityNotFound);
|
||||
return;
|
||||
}
|
||||
|
||||
var decCipher = await cipher.DecryptAsync();
|
||||
|
||||
if (decCipher.Reprompt != CipherRepromptType.None)
|
||||
{
|
||||
// Prompt for password using either the lock screen or dialog unless
|
||||
|
|
Loading…
Reference in a new issue