Skip to content

Commit 92fa027

Browse files
Merge pull request #63832 from nextcloud/backport/63710/stable34
[stable34] fix(webauthn): Throw on uid mismatch when updating registration
2 parents c76d5f8 + 91144b6 commit 92fa027

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)