Skip to content

Fix issues with reseting two-factor authentication in the accounts manager.#2988

Merged
Alex-Jordan merged 1 commit into
openwebwork:WeBWorK-2.21from
drgrice1:bugfix/instructor-2fa-reset
May 27, 2026
Merged

Fix issues with reseting two-factor authentication in the accounts manager.#2988
Alex-Jordan merged 1 commit into
openwebwork:WeBWorK-2.21from
drgrice1:bugfix/instructor-2fa-reset

Conversation

@drgrice1
Copy link
Copy Markdown
Member

First there was a typo in the name of the form permission for the reset_2fa form. As a result the permission was never actually checked since if a form does not have a permission in the FORM_PERMS has it is assumed that no permission is needed.

Also, if a user does not have a password record in the database then don't try to reset the OTP secret. The user doesn't have one anyway, and attempting to access the non-existing database record throws an exception.

…nager.

First there was a typo in the name of the form permission for the
reset_2fa form.  As a result the permission was never actually checked
since if a form does not have a permission in the `FORM_PERMS` has it is
assumed that no permission is needed.

Also, if a user does not have a password record in the database then
don't try to reset the OTP secret. The user doesn't have one anyway, and
attempting to access the non-existing database record throws an
exception.
@drgrice1 drgrice1 force-pushed the bugfix/instructor-2fa-reset branch from 7cd2c0d to c70e083 Compare May 27, 2026 02:32
@Alex-Jordan Alex-Jordan merged commit f1cefc3 into openwebwork:WeBWorK-2.21 May 27, 2026
2 checks passed
@drgrice1 drgrice1 deleted the bugfix/instructor-2fa-reset branch May 27, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants