Fix authentication/login registration id missing property
As of af674fec3f
, the passed
registrations array is stripped and only u2f properties are returned. Hence, the `id` prop gets removed and
we have to look it up in the original data instead.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Родитель
645afb1dcf
Коммит
3afdfe856c
|
@ -154,7 +154,10 @@ class U2FManager {
|
|||
return false;
|
||||
}
|
||||
|
||||
$registration = $this->mapper->findRegistration($user, $reg->id);
|
||||
$origReg = reset(array_filter($registrations, function(object $registration) use ($reg) {
|
||||
return $registration->keyHandle === $reg->keyHandle;
|
||||
}));
|
||||
$registration = $this->mapper->findRegistration($user, $origReg->id);
|
||||
$registration->setCounter($reg->counter);
|
||||
$this->mapper->update($registration);
|
||||
return true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче