Skip to content
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

Ignore invalid passkey credentials #16

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions crates/bitwarden-fido/src/authenticator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,17 +271,22 @@
let enc = self.client.internal.get_encryption_settings()?;
let all_credentials = self.credential_store.all_credentials().await?;

all_credentials
Ok(all_credentials

Check warning on line 274 in crates/bitwarden-fido/src/authenticator.rs

View check run for this annotation

Codecov / codecov/patch

crates/bitwarden-fido/src/authenticator.rs#L274

Added line #L274 was not covered by tests
.into_iter()
.map(
|cipher| -> Result<Vec<Fido2CredentialAutofillView>, CredentialsForAutofillError> {
Ok(Fido2CredentialAutofillView::from_cipher_view(
&cipher, &*enc,
)?)
},
)
.flatten_ok()
.collect()
.filter_map(|cipher| -> Option<Vec<Fido2CredentialAutofillView>> {
match Fido2CredentialAutofillView::from_cipher_view(&cipher, &*enc) {
Ok(view) => Some(view),
Err(e) => {
error!(
"Error converting credential to autofill view for cipher {:?}: {e:?}",

Check warning on line 281 in crates/bitwarden-fido/src/authenticator.rs

View check run for this annotation

Codecov / codecov/patch

crates/bitwarden-fido/src/authenticator.rs#L276-L281

Added lines #L276 - L281 were not covered by tests
cipher.id
);
None

Check warning on line 284 in crates/bitwarden-fido/src/authenticator.rs

View check run for this annotation

Codecov / codecov/patch

crates/bitwarden-fido/src/authenticator.rs#L284

Added line #L284 was not covered by tests
}
}
})
.flatten()
.collect())

Check warning on line 289 in crates/bitwarden-fido/src/authenticator.rs

View check run for this annotation

Codecov / codecov/patch

crates/bitwarden-fido/src/authenticator.rs#L287-L289

Added lines #L287 - L289 were not covered by tests
}

pub(super) fn get_authenticator(
Expand Down
Loading