Harden disposable email detection

This commit is contained in:
DariusIII
2025-11-28 17:07:45 +01:00
parent 703d03c9bf
commit e168947986
6 changed files with 348 additions and 6 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ use App\Models\ReleaseComment;
use App\Models\User;
use App\Models\UserDownload;
use App\Models\UserRequest;
use App\Rules\ValidEmailDomain;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Foundation\Application;
@@ -131,7 +132,7 @@ class ProfileController extends BasePageController
return redirect()->to('profileedit');
case 'submit':
$validator = Validator::make($request->all(), [
'email' => ['nullable', 'string', 'email', 'max:255', 'unique:users,email,'.$userid, 'indisposable'],
'email' => ['nullable', 'string', 'email', 'max:255', 'unique:users,email,'.$userid, 'indisposable', new ValidEmailDomain()],
'password' => ['nullable', 'string', 'min:8', 'confirmed', 'regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/'],
]);