Skip to content

Commit f43efe4

Browse files
Merge pull request #63767 from nextcloud/backport/63710/stable35
[stable35] fix(webauthn): Throw on uid mismatch when updating registration
2 parents 7e87896 + 954babe commit f43efe4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/private/Authentication/WebAuthn/CredentialRepository.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public function saveAndReturnCredentialSource(PublicKeyCredentialSource $publicK
6262
$entity = PublicKeyCredentialEntity::fromPublicKeyCrendentialSource($name, $publicKeyCredentialSource, $userVerification);
6363

6464
if ($oldEntity) {
65+
if ($oldEntity->getUid() !== $entity->getUid()) {
66+
throw new \InvalidArgumentException('Uid mismatch');
67+
}
6568
$entity->setId($oldEntity->getId());
6669
if ($defaultName) {
6770
$entity->setName($oldEntity->getName());

0 commit comments

Comments
 (0)