Skip to content

Commit

Permalink
Merge pull request #8 from goedemiddag/attestation-rewrite
Browse files Browse the repository at this point in the history
Clear resident key to prevent client resident encoding
  • Loading branch information
silvano-a authored Nov 3, 2023
2 parents fe4d8d6 + f74a49e commit c31dba5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
"require-dev": {
"laravel/framework": "^10",
"laravel/tinker": "^2.8",
"phpunit/phpunit": "^9.5.2"
},
"autoload": {
Expand Down
4 changes: 1 addition & 3 deletions src/LarapassServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,7 @@ static function ($app) {
$config->get('larapass.attachment')
);

if ($userless = $config->get('larapass.userless')) {
$selection->setResidentKey($userless);
}
$selection->clearResidentKey();

return $selection;
}
Expand Down
4 changes: 4 additions & 0 deletions src/WebAuthn/AuthenticatorSelectionCriteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public function getResidentKey(): ?string
return $this->residentKey;
}

public function clearResidentKey(): void
{
$this->residentKey = null;
}
/**
* @return array<string, mixed>
*/
Expand Down

0 comments on commit c31dba5

Please sign in to comment.