Skip to content

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

Merged
DarkGhostHunter merged 4 commits intoLaragear:2.xfrom
Haruki1707:2.x
Apr 22, 2024
Merged

[2.x] FIX: Redirection route in ConfirmTwoFactorCode middleware.#79
DarkGhostHunter merged 4 commits intoLaragear:2.xfrom
Haruki1707:2.x

Conversation

@Haruki1707
Copy link
Copy Markdown
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');

@sonarqubecloud
Copy link
Copy Markdown

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

@codecov
Copy link
Copy Markdown

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
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