Skip to content

Commit

Permalink
Prevent Illegal Invokcation on getPublicKey/getPublicKeyAlgorithm (#2323
Browse files Browse the repository at this point in the history
)

Prevent Illegal Invocation on getPublicKey/getPublicKeyAlgorithm
  • Loading branch information
Keroosha authored Oct 5, 2024
1 parent 5efa515 commit 928ed65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions keepassxc-browser/content/passkeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 928ed65

Please sign in to comment.