Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes 2fa disabled, but still shows when route is '/admin' #1488

Merged
merged 3 commits into from
Feb 20, 2021

Conversation

PunchRockgroin
Copy link
Contributor

@PunchRockgroin PunchRockgroin commented Dec 23, 2020

When logging in when ADMIN_REQUIRES_2FA=false in .env, the successful admin redirect could point to "/admin", but the TwoFactorAuthenticationStatus middleware checks for

$request->is('admin/*')

which fails the test and shows the 2fa requirement page. Going to any other admin page does not show the 2fa requirement page. This small change catches the 'admin' url by changing

$request->is('admin/*')

to

$request->is('admin*')

PunchRockgroin and others added 3 commits December 23, 2020 10:33
When logging in when 2fa is disabled in .env, the redirect could point to "/admin", but the middleware checks for 'admin/*', which fails the test and shows the 2fa requirement page. Going to any other page does not show the 2fa requirement page. This small change catches the '/admin' url.
@rappasoft rappasoft merged commit 4c3ab04 into rappasoft:master Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants