Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remember the webauthn name of devices
Fixes #20289
we should not reset to default once we have logged in with the device.

Signed-off-by: Roeland Jago Douma <[email protected]>
  • Loading branch information
rullzer authored and backportbot[bot] committed May 12, 2020
commit 8e9433aee915dfa5f73644b8657f2a8c368fafe7
4 changes: 3 additions & 1 deletion lib/private/Authentication/WebAuthn/CredentialRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,17 @@ public function saveAndReturnCredentialSource(PublicKeyCredentialSource $publicK
} catch (IMapperException $e) {
}

$defaultName = false;
if ($name === null) {
$defaultName = true;
$name = 'default';
}

$entity = PublicKeyCredentialEntity::fromPublicKeyCrendentialSource($name, $publicKeyCredentialSource);

if ($oldEntity) {
$entity->setId($oldEntity->getId());
if ($name === null) {
if ($defaultName) {
$entity->setName($oldEntity->getName());
}
}
Expand Down