Disable 2fa when in maintenance mode

Created on 6 February 2023, almost 2 years ago
Updated 9 February 2023, almost 2 years ago

Problem/Motivation

When miniorange is enabled and the site goes into maintenance mode, it becomes impossible as a user with 2fa enabled to log in. This isn't necessarily a problem for normal end-users, but is a problem for administrators who need to manage the site.

When you are logged out, miniorange attempts to take you to the 2fa input page, but since the site is in maintenance mode it takes you to the maintenance page instead, making it impossible to enter your 2fa code.

Steps to reproduce

Enable miniorange and then put the site into maintenance mode and log out (Or if you have an auto-logout module enabled, let it log you out). Try to log in while in maintenance mode.

Proposed resolution

Before injecting the 2fa form during user log in, check to see if maintenance mode is enabled on the site. If so, bypass the 2fa and allow the user to login.

Feature request
Status

Fixed

Version

4.6

Component

Code

Created by

🇺🇸United States jfurnas

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024