Defect #33925

ArgumentError in lib/redmine/twofa/base.rb after updating a source file in development mode

Added by Go MAEDA over 1 year ago. Updated over 1 year ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Accounts / authentication
Target version:-
Resolution:Fixed Affected version:

Description

The attached patch fix-2fa-argument-error.patch fixes the error described below. The error occurs in development mode. No problem in production mode.

Steps to reproduce:

1. Run Redmine in development mode (bin/rails s)
2. Login with any user
3. Go to "My account" and click "Enable authenticator app"
4. Setup up two-factor authentication for the account
5. Update some source file of Redmine (e.g. run touch config/locales/en.yml)
6. 2. Go to "My account" and click "Generate backup codes"
7. You will see the following error entering your authentication code

ArgumentError in TwofaBackupCodesController#create
A copy of Redmine::Twofa::Base has been removed from the module tree but is still active!

ArgumentError.png (129 KB) Go MAEDA, 2020-08-30 09:16

fix-2fa-argument-error.patch Magnifier (1.26 KB) Go MAEDA, 2020-08-30 09:20


Related issues

Related to Redmine - Feature #1237: Add support for two-factor authentication Closed 2008-05-14

Associated revisions

Revision 19995
Added by Go MAEDA over 1 year ago

Fix that Redmine::Twofa::Base raises ArgumentError in development mode (#1237, #33925).

History

#1 Updated by Go MAEDA over 1 year ago

  • Related to Feature #1237: Add support for two-factor authentication added

#2 Updated by Felix Schäfer over 1 year ago

Thank you for catching this bug. The patch looks good to me.

#3 Updated by Go MAEDA over 1 year ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the fix as a part of #1237.

Thank you for checking the fix.

Also available in: Atom PDF