- Affected version
- 2.3.7
XF\Service\Passkey\ManagerService::getPasskeyUser()
can return null, which will cause internal server errors due to various login methods requiring a user entity.The
validate
function should be checking that the user exists, or the simple way would be to add ->with('User', true)
when fetching passKey record.ie something like:
PHP:
$this->passkey = \XF::app()->finder(PasskeyFinder::class)
->with('User', true)
->where('credential_id', $credentialId)
->fetchOne();
Additionally, the
xf_passkey
entries for a user should be purged when that user is deleted. Both changes are probably required for correctness; not just deleting the user's passkey records.