Skip to content

Commit

Permalink
Add a named route for POST password/reset (#23958)
Browse files Browse the repository at this point in the history
The reset.stub is using the GET named route (password.request) for the POST password/reset request (changed in #17718). Incorrectly using a named route from another route is confusing and could lead to unexpected results.
  • Loading branch information
paulredmond authored and taylorotwell committed Apr 25, 2018
1 parent 1360f3b commit 91aefbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="card-header">{{ __('Reset Password') }}</div>

<div class="card-body">
<form method="POST" action="{{ route('password.request') }}">
<form method="POST" action="{{ route('password.update') }}">
@csrf

<input type="hidden" name="token" value="{{ $token }}">
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Routing/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ public function auth()
$this->get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request');
$this->post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email');
$this->get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset');
$this->post('password/reset', 'Auth\ResetPasswordController@reset');
$this->post('password/reset', 'Auth\ResetPasswordController@reset')->name('password.update');
}

/**
Expand Down

0 comments on commit 91aefbe

Please sign in to comment.