Problem/Motivation
We are getting below error on D10 once form is submitted after OTP is enter in the site.
We are getting the correct seed size in D10 but seems decryption and encryption logic need correct.
Steps to reproduce
1. Run Migration
2. Provide username and password and Enter the OTP from TOTP APP on the new site after migration.
You will be getting the below error.
The website encountered an unexpected error. Please try again later.
RangeException: Base32::doDecode() only expects characters in the correct base32 alphabet in ParagonIE\ConstantTime\Base32::doDecode() (line 421 of /var/www/html/vendor/paragonie/constant_time_encoding/src/Base32.php).
ParagonIE\ConstantTime\Base32::decodeUpper('') (Line: 81)
ParagonIE\ConstantTime\Encoding::base32DecodeUpper('') (Line: 266)
Drupal\tfa\Plugin\TfaValidation\TfaTotpValidation->validate('405072') (Line: 222)
Drupal\tfa\Plugin\TfaValidation\TfaTotpValidation->validateForm(Array, Object) (Line: 273)
Drupal\tfa\Form\EntryForm->validateForm(Array, Object)
call_user_func_array(Array, Array) (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 275)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'tfa_entry_form') (Line: 118)
Drupal\Core\Form\FormValidator->validateForm('tfa_entry_form', Array, Object) (Line: 593)
Drupal\Core\Form\FormBuilder->processForm('tfa_entry_form', Array, Object) (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 592)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 182)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 44)
Drupal\redirect_after_login\RedirectMiddleware->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Proposed resolution
Update Decryption Encryption Logic.
Remaining tasks
User interface changes
API changes
Data model changes