No Code Attached Yet
avatar OctavianC
OctavianC
30 Oct 2023

Steps to reproduce the issue

  • Install Joomla! 3.10.12
  • Enable the Two Factor Authentication - Google Authenticator plugin
  • Edit your profile and set Two Factor Authentication - Authentication Method to 'Google Authenticator'
  • Install FreeOTP on your phone or any other Authenticator app
  • Using FreeOTP scan the QR code from the Profile page and finish the setup
  • Generate a code using FreeOTP and add it to the Security Code textbox
  • Click Save and make sure Two Factor Authentication has been enabled for your account
  • Update to Joomla! 4.4 by whatever means
  • Try to login.

Expected result

Captive page asking for the Two Factor code.

Actual result

UserFactory not set in Joomla\Component\Users\Administrator\Table\MfaTable

System information (as much as possible)

3.10.12 to 4.4.0 but issue present in 5.0.0

Additional comments

Issue caused by the migrateFromLegacyMFA logic since moving to UserFactoryAwareTrait #40430
Creating the MfaTable objects through (new MfaTable($db))->save() will cause them to not have a userFactory attached.
My proposal would be Factory::getApplication()->bootComponent('com_users')->getMVCFactory()->createTable('Mfa', 'Administrator')->save(). I can create a PR to address this, not sure which branch though

avatar OctavianC OctavianC - open - 30 Oct 2023
avatar joomla-cms-bot joomla-cms-bot - change - 30 Oct 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Oct 2023
avatar alikon alikon - close - 30 Oct 2023
avatar alikon
alikon - comment - 30 Oct 2023

please test #42253

avatar alikon alikon - change - 30 Oct 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-10-30 13:45:18
Closed_By alikon

Add a Comment

Login with GitHub to post a comment