Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-05-07 17:13:19 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2020-05-07 17:13:19 +0300
commitf4ac9ffa2c5c50eba6298d3ae699b4aa49f8cf82 (patch)
tree23da70648e0ddfadb49b049dfd904ff1bdc18e66 /lib
parentd7305798092ba3c409ca330fbe526a096e2003bc (diff)
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 <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Authentication/WebAuthn/CredentialRepository.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Authentication/WebAuthn/CredentialRepository.php b/lib/private/Authentication/WebAuthn/CredentialRepository.php
index f4ff950e17b..f75b4b5ae46 100644
--- a/lib/private/Authentication/WebAuthn/CredentialRepository.php
+++ b/lib/private/Authentication/WebAuthn/CredentialRepository.php
@@ -71,7 +71,9 @@ class CredentialRepository implements PublicKeyCredentialSourceRepository {
} catch (IMapperException $e) {
}
+ $defaultName = false;
if ($name === null) {
+ $defaultName = true;
$name = 'default';
}
@@ -79,7 +81,7 @@ class CredentialRepository implements PublicKeyCredentialSourceRepository {
if ($oldEntity) {
$entity->setId($oldEntity->getId());
- if ($name === null) {
+ if ($defaultName) {
$entity->setName($oldEntity->getName());
}
}