From 00f9c9b4d78d9100b52c712b87228b837489099d Mon Sep 17 00:00:00 2001 From: Nathan Smith Date: Tue, 16 Jun 2020 12:18:55 -0500 Subject: [PATCH 1/2] MC-35119: U2F Key registration error in Chrome on Ubuntu --- TwoFactorAuth/Model/Provider/Engine/U2fKey/WebAuthn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TwoFactorAuth/Model/Provider/Engine/U2fKey/WebAuthn.php b/TwoFactorAuth/Model/Provider/Engine/U2fKey/WebAuthn.php index c314f8ca..6553a38e 100644 --- a/TwoFactorAuth/Model/Provider/Engine/U2fKey/WebAuthn.php +++ b/TwoFactorAuth/Model/Provider/Engine/U2fKey/WebAuthn.php @@ -298,7 +298,7 @@ public function getPublicKeyFromRegistrationData(array $data): array return [ 'key' => $attestationObject['attestationData']['keyBytes'], 'id' => $credentialData['id'], - 'aaguid' => $attestationObject['attestationData']['aaguid'] ?? null + 'aaguid' => base64_encode($attestationObject['attestationData']['aaguid']) ?? null ]; } From cfefd376b6a6828f6a8c26021d9fedda40f44bd1 Mon Sep 17 00:00:00 2001 From: Nathan Smith Date: Wed, 17 Jun 2020 11:58:53 -0500 Subject: [PATCH 2/2] MC-35119: U2F Key registration error in Chrome on Ubuntu --- TwoFactorAuth/Model/Provider/Engine/U2fKey/WebAuthn.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TwoFactorAuth/Model/Provider/Engine/U2fKey/WebAuthn.php b/TwoFactorAuth/Model/Provider/Engine/U2fKey/WebAuthn.php index 6553a38e..e9e499d2 100644 --- a/TwoFactorAuth/Model/Provider/Engine/U2fKey/WebAuthn.php +++ b/TwoFactorAuth/Model/Provider/Engine/U2fKey/WebAuthn.php @@ -298,7 +298,9 @@ public function getPublicKeyFromRegistrationData(array $data): array return [ 'key' => $attestationObject['attestationData']['keyBytes'], 'id' => $credentialData['id'], - 'aaguid' => base64_encode($attestationObject['attestationData']['aaguid']) ?? null + 'aaguid' => empty($attestationObject['attestationData']['aaguid']) + ? null + : base64_encode($attestationObject['attestationData']['aaguid']) ]; }