From 928ed65e510db228bd4d2d0a4a6319fea913cb2b Mon Sep 17 00:00:00 2001 From: Kirill Poletaev Date: Sat, 5 Oct 2024 08:51:09 +0300 Subject: [PATCH] Prevent Illegal Invokcation on getPublicKey/getPublicKeyAlgorithm (#2323) Prevent Illegal Invocation on getPublicKey/getPublicKeyAlgorithm --- keepassxc-browser/content/passkeys.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/keepassxc-browser/content/passkeys.js b/keepassxc-browser/content/passkeys.js index cd56978..7e392f0 100644 --- a/keepassxc-browser/content/passkeys.js +++ b/keepassxc-browser/content/passkeys.js @@ -31,10 +31,11 @@ const createAttestationResponse = function(publicKey) { attestationObject: kpxcBase64ToArrayBuffer(publicKey.response.attestationObject), clientDataJSON: kpxcBase64ToArrayBuffer(publicKey.response.clientDataJSON), getAuthenticatorData: () => kpxcBase64ToArrayBuffer(publicKey.response?.authenticatorData), + getPublicKey: () => null, + getPublicKeyAlgorithm: () => publicKey.response?.publicKeyAlgorithm, getTransports: () => [ 'internal' ] }; - - return Object.setPrototypeOf(response, AuthenticatorAttestationResponse.prototype); + return Object.setPrototypeOf(response, AuthenticatorAttestationResponse.prototype); }; // Wraps response to AuthenticatorAssertionResponse object