From f1149b712a5623ebe805da27a0e0ebb6a8b5a23d Mon Sep 17 00:00:00 2001 From: A1Gard Date: Fri, 20 Oct 2023 05:49:20 +0330 Subject: [PATCH] improved security for impex --- app/Http/Controllers/ImpexController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Http/Controllers/ImpexController.php b/app/Http/Controllers/ImpexController.php index 4e5b52f..e79f1dc 100644 --- a/app/Http/Controllers/ImpexController.php +++ b/app/Http/Controllers/ImpexController.php @@ -375,9 +375,15 @@ class ImpexController extends Controller } public function login(){ + if (!auth()->check()){ + return abort(403); + } return \Auth::guard('customer')->loginUsingId(Customer::inRandomOrder()->first()->id); } public function loginas($tel){ + if (!auth()->check()){ + return abort(403); + } return \Auth::guard('customer')->loginUsingId(Customer::whereMobile($tel)->first()->id); } }