From 1f82d47ce5e73c8679c9412d86101b784875b38a Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 29 Oct 2023 03:47:06 -0600 Subject: [PATCH] Update ApiV1Dot1Controller, add domain to iar redirect --- app/Http/Controllers/Api/ApiV1Dot1Controller.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Api/ApiV1Dot1Controller.php b/app/Http/Controllers/Api/ApiV1Dot1Controller.php index f63d69177..aa63e92e0 100644 --- a/app/Http/Controllers/Api/ApiV1Dot1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Dot1Controller.php @@ -543,10 +543,10 @@ class ApiV1Dot1Controller extends Controller $user->password = Hash::make($password); $user->register_source = 'app'; $user->app_register_ip = $request->ip(); - $user->app_register_token = Str::random(32); + $user->app_register_token = Str::random(40); $user->save(); - $rtoken = Str::random(mt_rand(64, 70)); + $rtoken = Str::random(64); $verify = new EmailVerification(); $verify->user_id = $user->id; @@ -570,12 +570,9 @@ class ApiV1Dot1Controller extends Controller 'ut' => 'required', 'rt' => 'required' ]); - if(config('pixelfed.bouncer.cloud_ips.ban_signups')) { - abort_if(BouncerService::checkIp($request->ip()), 404); - } $ut = $request->input('ut'); $rt = $request->input('rt'); - $url = 'pixelfed://confirm-account/'. $ut . '?rt=' . $rt; + $url = 'pixelfed://confirm-account/'. $ut . '?rt=' . $rt . '&domain=' . config('pixelfed.domain.app'); return redirect()->away($url); }