Skip to content

Commit f68348d

Browse files
authored
Merge pull request #63834 from nextcloud/backport/63710/stable32
[stable32] fix(webauthn): Throw on uid mismatch when updating registration
2 parents 9bbe171 + 0d0e6d7 commit f68348d

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
@@ -61,6 +61,9 @@ public function saveAndReturnCredentialSource(PublicKeyCredentialSource $publicK
6161
$entity = PublicKeyCredentialEntity::fromPublicKeyCrendentialSource($name, $publicKeyCredentialSource, $userVerification);
6262

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

0 commit comments

Comments
 (0)