No Code Attached Yet Information Required
avatar peter1szalatnay
peter1szalatnay
11 Oct 2024

Steps to reproduce the issue

Login with passkey and have xdebug enabled.

Plugin events 'onUserAfterLogin' and 'onUserLoginFailure' in plugins/system/webauthn/src/PluginTraits/AjaxHandlerLogin.php are missing the required 'subject' and or 'options' value for the event.

Expected result

Login without an error.

Actual result

Just an example when one of them failing.

Error: Uncaught TypeError: Joomla\CMS\Event\User\AbstractLoginEvent::onSetOptions(): Argument #1 ($value) must be of type array, null given, called in /usr/share/nginx/html/libraries/src/Event/AbstractEvent.php on line 227 and defined in /usr/share/nginx/html/libraries/src/Event/User/AbstractLoginEvent.php:56
Stack trace:
#0 /usr/share/nginx/html/libraries/src/Event/AbstractEvent.php(227): Joomla\CMS\Event\User\AbstractLoginEvent->onSetOptions(NULL)
#1 /usr/share/nginx/html/libraries/src/Event/AbstractEvent.php(115): Joomla\CMS\Event\AbstractEvent->setArgument('options', NULL)
#2 /usr/share/nginx/html/libraries/src/Event/AbstractImmutableEvent.php(51): Joomla\CMS\Event\AbstractEvent->__construct('onUserLoginFail...', Array)
#3 /usr/share/nginx/html/libraries/src/Event/User/UserEvent.php(55): Joomla\CMS\Event\AbstractImmutableEvent->__construct('onUserLoginFail...', Array)
#4 /usr/share/nginx/html/plugins/system/webauthn/src/PluginTraits/AjaxHandlerLogin.php(268): Joomla\CMS\Event\User\UserEvent->__construct('onUserLoginFail...', Array)
#5 /usr/share/nginx/html/plugins/system/webauthn/src/PluginTraits/AjaxHandlerLogin.php(118): Joomla\Plugin\System\Webauthn\Extension\Webauthn->processLoginFailure(Object(Joomla\CMS\Authentication\AuthenticationResponse))
#6 /usr/share/nginx/html/libraries/vendor/joomla/event/src/Dispatcher.php(454): Joomla\Plugin\System\Webauthn\Extension\Webauthn->onAjaxWebauthnLogin(Object(Joomla\CMS\Event\Plugin\System\Webauthn\AjaxLogin))
#7 /usr/share/nginx/html/plugins/system/webauthn/src/PluginTraits/AjaxHandler.php(125): Joomla\Event\Dispatcher->dispatch('onAjaxWebauthnL...', Object(Joomla\CMS\Event\Plugin\System\Webauthn\AjaxLogin))
#8 /usr/share/nginx/html/libraries/vendor/joomla/event/src/Dispatcher.php(454): Joomla\Plugin\System\Webauthn\Extension\Webauthn->onAjaxWebauthn(Object(Joomla\CMS\Event\Plugin\AjaxEvent))
#9 /usr/share/nginx/html/components/com_ajax/ajax.php(136): Joomla\Event\Dispatcher->dispatch('onAjaxWebauthn', Object(Joomla\CMS\Event\Plugin\AjaxEvent))
#10 /usr/share/nginx/html/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): require_once('/usr/share/ngin...')
#11 /usr/share/nginx/html/libraries/src/Dispatcher/LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher{closure}('/usr/share/ngin...')
#12 /usr/share/nginx/html/libraries/src/Component/ComponentHelper.php(361): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
#13 /usr/share/nginx/html/libraries/src/Application/SiteApplication.php(218): Joomla\CMS\Component\ComponentHelper::renderComponent('com_ajax')
#14 /usr/share/nginx/html/libraries/src/Application/SiteApplication.php(261): Joomla\CMS\Application\SiteApplication->dispatch()
#15 /usr/share/nginx/html/libraries/src/Application/CMSApplication.php(306): Joomla\CMS\Application\SiteApplication->doExecute()
#16 /usr/share/nginx/html/includes/app.php(58): Joomla\CMS\Application\CMSApplication->execute()
#17 /usr/share/nginx/html/index.php(32): require_once('/usr/share/ngin...')
#18 {main}
thrown

System information (as much as possible)

dbserver: mysql
dbversion: 8.0.29-21
phpversion: 8.3.12
server: nginx/1.27.1
sapi_name: fpm-fcgi
version: Joomla! 5.1.4 Stable [ Kudumisha ] 27-August-2024 16:00 GMT

Additional comments

avatar peter1szalatnay peter1szalatnay - open - 11 Oct 2024
avatar joomla-cms-bot joomla-cms-bot - change - 11 Oct 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Oct 2024
avatar peter1szalatnay peter1szalatnay - change - 11 Oct 2024
The description was changed
avatar peter1szalatnay peter1szalatnay - edited - 11 Oct 2024
avatar Fedik
Fedik - comment - 12 Oct 2024

In theory it should be fixed with #43934 in 5.2
Please test

avatar richard67 richard67 - change - 16 Oct 2024
Labels Added: Information Required
avatar richard67 richard67 - labeled - 16 Oct 2024
avatar peter1szalatnay peter1szalatnay - close - 20 Oct 2024
avatar peter1szalatnay peter1szalatnay - change - 20 Oct 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-10-20 08:47:25
Closed_By peter1szalatnay
avatar peter1szalatnay
peter1szalatnay - comment - 20 Oct 2024

This has been resolved in 5.2

Add a Comment

Login with GitHub to post a comment