Fixed Passkey registration failed: Data too long for column 'credential_id' at row 1

Affected version
2.3.4
We got a few similar server error logged over the last days:

ErrorException: Passkey registration failed: MySQL query error [1406]: Data too long for column 'credential_id' at row 1 src/XF/Error.php:82

Stack trace
Code:
#0 src/XF.php(266): XF\Error->logError('Passkey registr...', false)
#1 src/XF/Service/Passkey/ManagerService.php(204): XF::logError('Passkey registr...')
#2 src/XF/Pub/Controller/AccountController.php(955): XF\Service\Passkey\ManagerService->create(Object(XF\Http\Request), NULL)
#3 src/XF/Mvc/Dispatcher.php(362): XF\Pub\Controller\AccountController->actionPasskeyAdd(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF:Account', 'PasskeyAdd', Object(XF\Mvc\RouteMatch), Object(ThemeHouse\UIX\XF\Pub\Controller\Account), NULL)
#5 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(ThemeHouse\UIX\XF\Pub\Controller\Account), NULL)
#6 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#8 src/XF.php(806): XF\App->run()
#9 index.php(23): XF::runApp('XF\\Pub\\App')
#10 {main}

Request state
Code:
array(4) {
  ["url"] => string(30) "/index.php?account/passkey/add"
  ["referrer"] => string(42) "https://forum.proxmox.com/account/security"
  ["_GET"] => array(1) {
    ["account/passkey/add"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

This is a rather old installation (setup at end of 2015 with XF 1) and so went through quite a few updates, but we always applied the updates a few days to weeks after their release, so never skipped many of them at once. Guesstimation: Seems to me like some upgrade step missed extending the schema for a specific column.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.5).

Change log:
Allow a Passkey credential_id to occupy up to 1024 characters.
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom