Skip to content

Commit d91752e

Browse files
committed
Ensure invalid attestation key is not sent through for attestation responses. Resolves #62
1 parent 05d6e8b commit d91752e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Services/Webauthn.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Cose\Algorithm\Manager;
1010
use Cose\Algorithm\Signature;
1111
use Illuminate\Contracts\Auth\Authenticatable as User;
12+
use Illuminate\Support\Arr;
1213
use Illuminate\Support\Str;
1314
use ParagonIE\ConstantTime\Base64UrlSafe;
1415
use Psr\Log\LoggerInterface;
@@ -295,6 +296,8 @@ public function serializePublicKeyOptionsForRequest(
295296
'challenge' => Base64UrlSafe::encodeUnpadded($options->challenge),
296297
];
297298

299+
Arr::forget($data, 'attestation');
300+
298301
if ($options instanceof PublicKeyCredentialCreationOptions) {
299302
$data['user'] = (array) $options->user;
300303

0 commit comments

Comments
 (0)