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

[2.x] FIX: Redirection route in ConfirmTwoFactorCode middleware. #79

Merged
merged 4 commits into from
Apr 22, 2024

Conversation

Haruki1707
Copy link
Contributor

@Haruki1707 Haruki1707 commented Apr 21, 2024

Adjusted Redirection Route Handling in Middleware.

Description

This fix refines the handling of the first parameter, "$route", in the ConfirmTwoFactorCode Middleware. It ensures the middleware functions correctly when the developer is forcing the middleware to run, without necessarily altering the default route.

Code samples

How to make it work without the fix

Route::get('/example', [ExampleController::class, 'create'])->middleware('2fa.confirm:2fa.confirm,force');

With the fix

Route::get('/example', [ExampleController::class, 'create'])->middleware('2fa.confirm:force');

Copy link

sonarcloud bot commented Apr 21, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (2.x@10b658e). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff           @@
##             2.x       #79   +/-   ##
=======================================
  Coverage       ?   100.00%           
  Complexity     ?       157           
=======================================
  Files          ?        20           
  Lines          ?       444           
  Branches       ?         0           
=======================================
  Hits           ?       444           
  Misses         ?         0           
  Partials       ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DarkGhostHunter DarkGhostHunter merged commit aa395af into Laragear:2.x Apr 22, 2024
18 checks passed
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.

2 participants