From 186ba7f018d60c5633b9e1c1e8d7d240a7731078 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 18 Mar 2023 21:51:28 -0600 Subject: [PATCH] Update email settings, add dangerzone middleware to prompt for password before you can change your email address. Fixes #4101 --- routes/web.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/web.php b/routes/web.php index bd1980b78..de6b2c3fe 100644 --- a/routes/web.php +++ b/routes/web.php @@ -421,8 +421,8 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact Route::delete('avatar', 'AvatarController@deleteAvatar'); Route::get('password', 'SettingsController@password')->name('settings.password')->middleware('dangerzone'); Route::post('password', 'SettingsController@passwordUpdate')->middleware('dangerzone'); - Route::get('email', 'SettingsController@email')->name('settings.email'); - Route::post('email', 'SettingsController@emailUpdate'); + Route::get('email', 'SettingsController@email')->name('settings.email')->middleware('dangerzone'); + Route::post('email', 'SettingsController@emailUpdate')->middleware('dangerzone'); Route::get('notifications', 'SettingsController@notifications')->name('settings.notifications'); Route::get('privacy', 'SettingsController@privacy')->name('settings.privacy'); Route::post('privacy', 'SettingsController@privacyStore');