mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
fix(browser): prevent registration-induced crash (#6799)
Fixed a bug where `authenticatorSelection` may be undefined and cause the extension to crash when attempting to register a new credential. Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
This commit is contained in:
@@ -62,9 +62,9 @@ navigator.credentials.create = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
const fallbackSupported =
|
const fallbackSupported =
|
||||||
(options?.publicKey?.authenticatorSelection.authenticatorAttachment === "platform" &&
|
(options?.publicKey?.authenticatorSelection?.authenticatorAttachment === "platform" &&
|
||||||
browserNativeWebauthnPlatformAuthenticatorSupport) ||
|
browserNativeWebauthnPlatformAuthenticatorSupport) ||
|
||||||
(options?.publicKey?.authenticatorSelection.authenticatorAttachment !== "platform" &&
|
(options?.publicKey?.authenticatorSelection?.authenticatorAttachment !== "platform" &&
|
||||||
browserNativeWebauthnSupport);
|
browserNativeWebauthnSupport);
|
||||||
try {
|
try {
|
||||||
const response = await messenger.request(
|
const response = await messenger.request(
|
||||||
|
|||||||
Reference in New Issue
Block a user