Skip to content

Commit c3759d7

Browse files
Add throttle to authed password routes (#159)
* Add throttle to authed password routes * Update settings.php --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent b9792f7 commit c3759d7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

routes/auth.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949
Route::get('confirm-password', [ConfirmablePasswordController::class, 'show'])
5050
->name('password.confirm');
5151

52-
Route::post('confirm-password', [ConfirmablePasswordController::class, 'store']);
52+
Route::post('confirm-password', [ConfirmablePasswordController::class, 'store'])
53+
->middleware('throttle:6,1');
5354

5455
Route::post('logout', [AuthenticatedSessionController::class, 'destroy'])
5556
->name('logout');

routes/settings.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
Route::delete('settings/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
1414

1515
Route::get('settings/password', [PasswordController::class, 'edit'])->name('password.edit');
16-
Route::put('settings/password', [PasswordController::class, 'update'])->name('password.update');
16+
17+
Route::put('settings/password', [PasswordController::class, 'update'])
18+
->middleware('throttle:6,1')
19+
->name('password.update');
1720

1821
Route::get('settings/appearance', function () {
1922
return Inertia::render('settings/Appearance');

0 commit comments

Comments
 (0)