Skip to content

Commit 79b01de

Browse files
authored
Merge pull request #63833 from nextcloud/backport/63710/stable33
[stable33] fix(webauthn): Throw on uid mismatch when updating registration
2 parents 40ff9f2 + 59f25e2 commit 79b01de

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)