1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

[EC-598] fix: bug in result mapping

This commit is contained in:
Andreas Coroiu
2023-04-18 11:29:03 +02:00
parent e876ba5421
commit 9b2f8b9462

View File

@@ -61,7 +61,7 @@ export class WebauthnUtils {
attestationObject: Fido2Utils.stringToBuffer(result.attestationObject), attestationObject: Fido2Utils.stringToBuffer(result.attestationObject),
getAuthenticatorData(): ArrayBuffer { getAuthenticatorData(): ArrayBuffer {
return Fido2Utils.stringToBuffer(this.result.authData); return Fido2Utils.stringToBuffer(result.authData);
}, },
getPublicKey(): ArrayBuffer { getPublicKey(): ArrayBuffer {
@@ -69,11 +69,11 @@ export class WebauthnUtils {
}, },
getPublicKeyAlgorithm(): number { getPublicKeyAlgorithm(): number {
return this.result.publicKeyAlgorithm; return result.publicKeyAlgorithm;
}, },
getTransports(): string[] { getTransports(): string[] {
return this.result.transports; return result.transports;
}, },
} as AuthenticatorAttestationResponse, } as AuthenticatorAttestationResponse,
getClientExtensionResults: () => ({}), getClientExtensionResults: () => ({}),
@@ -123,7 +123,7 @@ export class WebauthnUtils {
userHandle: Fido2Utils.stringToBuffer(result.userHandle), userHandle: Fido2Utils.stringToBuffer(result.userHandle),
} as AuthenticatorAssertionResponse, } as AuthenticatorAssertionResponse,
getClientExtensionResults: () => ({}), getClientExtensionResults: () => ({}),
authenticatorAttachment: "hybrid", authenticatorAttachment: "cross-platform",
} as PublicKeyCredential; } as PublicKeyCredential;
// Modify prototype chains to fix `instanceof` calls. // Modify prototype chains to fix `instanceof` calls.