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

[3.x] Fetch reset token explicitly. #130

Merged
merged 1 commit into from
Aug 13, 2020

Conversation

syntheticminds
Copy link
Contributor

With a route like the following, $token in showResetForm(Request $request, $token = null) will give the value of {subdomain} and not {token} because route parameters are injected based on their order.

Route::group(['domain' => '{subdomain}.example.com'], function () {
    $this->get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset');
});

This pull request proposes that the token is explicitly fetched by name to avoid this.

I have submitted this to the master branch because it could break sites that do not use Auth::routes() where {token} is the standard parameter name.

@driesvints driesvints changed the title Fetch reset token explicitly. [3.x] Fetch reset token explicitly. Aug 13, 2020
@taylorotwell taylorotwell merged commit d698135 into laravel:master Aug 13, 2020
@syntheticminds syntheticminds deleted the reset-token-fix branch August 13, 2020 19:54
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