Project

General

Profile

Actions

Bug #6666

closed

Two factor authentication with verify current password causes error

Added by krileon over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Start date:
09 June 2017
Due date:
% Done:

100%

Estimated time:

Description

If the user has two factor authentication enabled and verify current password is enabled for the password field it causes the verification of the current password to always fail since the secret key is missing, but we need to make sure the password is correct. See if there's a way to skip authentication plugins for this case or maybe wrong API is being used.

https://www.joomlapolis.com/forum/255-developer-members-support/236805-reset-password-not-working?start=6

Actions #1

Updated by krileon over 7 years ago

Looks like in verifyPassword two step is already being disabled. Maybe this usage was changed in Joomla?

Actions #2

Updated by krileon over 7 years ago

Confirmed using Joomlas Google authentication plugin.

Notice: Undefined index: secretkey in D:\wamp64\www\dev\plugins\authentication\joomla\joomla.php on line 193
Notice: Undefined index: securitycode in D:\wamp64\www\dev\plugins\twofactorauth\totp\totp.php on line 195
Notice: Undefined index: securitycode in D:\wamp64\www\dev\plugins\twofactorauth\totp\totp.php on line 206
Notice: Undefined index: securitycode in D:\wamp64\www\dev\plugins\twofactorauth\totp\totp.php on line 217

All of the above notices are thrown when this happens.

Actions #3

Updated by krileon over 7 years ago

Joomla 3.2+ has a JUserHelper::verifyPassword function to verify password. Replace current authentication call usage with it.

Actions #4

Updated by krileon over 7 years ago

The secretkey notice is fixed by changing to new API. The 3 securitycode notices appear to be a bug in Joomla it self. Joomla profile save also throws them if you interrupt the redirect. It's due to the securitycode input no longer being output since the authenticator has already been saved. We can probably workaround it in CBs saving of authenticator settings by skipping the save process if no secret key is in the postdata.

Actions #5

Updated by krileon over 7 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Fixed in MR !1266

Actions #6

Updated by krileon over 7 years ago

  • Target version changed from CB 2.2 to CB 2.1.3
Actions #7

Updated by krileon over 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF