From d59aeae917352b69ddfbc187b3f1524122ac868f Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Mon, 12 Jan 2026 11:57:02 +0530 Subject: [PATCH 1/4] gwm : wrong mpin --- app/Config/Routes.php | 2 +- app/Controllers/RestAuthenticationController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 2610b9e..4c02e4f 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -453,7 +453,7 @@ $routes->group("/api", ["filter" => "authJWT"], function ($routes) { // $routes->post("employeeRest/createOrUpdateEmployeePolicySiAmount", "EmployeeRestController::createOrUpdateEmployeePolicySiAmount"); // $routes->post("employeeRest/calculatePremium", "EmployeeRestController::calculatePremium"); - + // $routes->post("updateMpin", "RestAuthenticationController::updateMpin"); $routes->group("employeeRest", ['filter' => ['appSignature' , 'authJWT'] ], function ($routes) { $routes->post('logout', 'RestAuthenticationController::logout'); diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 15469ec..41a716d 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -986,7 +986,7 @@ class RestAuthenticationController extends AdminController log_message('error', ' '); log_message('error', '************************ PRE END ********************************'); - $result = ['user_verification' => false , 'message' => "User not found"]; + $result = ['mpin_verification' => false , 'message' => "Wrong Mpin"]; return $this->respond(['status' => 'failed','code' => 404,'data' => $result],200); } From a5628280c680a43d2f4edbf6d0b3d5d00eb6a46e Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Mon, 12 Jan 2026 12:04:44 +0530 Subject: [PATCH 2/4] gwm : wrong mpin --- app/Config/Filters.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Config/Filters.php b/app/Config/Filters.php index e22e4af..78da473 100755 --- a/app/Config/Filters.php +++ b/app/Config/Filters.php @@ -46,7 +46,7 @@ class Filters extends BaseConfig 'appSignature' => VerifyAppSignature::class, 'GlobalPostFileUploadGuard' => GlobalPostFileUploadGuard::class, 'SecurityInputFilter' => SecurityInputFilter::class, - 'AclFilter' => AclFilter::class, + // 'AclFilter' => AclFilter::class, ]; From 51689bd82caa08d94b4e5d4ff002c67aeb2db28a Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Mon, 12 Jan 2026 12:07:51 +0530 Subject: [PATCH 3/4] gwm : wrong mpin --- app/Config/Filters.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Config/Filters.php b/app/Config/Filters.php index 78da473..384d143 100755 --- a/app/Config/Filters.php +++ b/app/Config/Filters.php @@ -60,7 +60,7 @@ class Filters extends BaseConfig public array $globals = [ 'before' => [ 'HttpRequestLog' => ['except' => 'cli/*'], - 'AclFilter' => ['except' => 'login', 'logout', 'auth/*', 'oauth2callback', 'download-*', 'claim-form-download', 'claims-feedback-form', 'autobookstackLogin'], + // 'AclFilter' => ['except' => 'login', 'logout', 'auth/*', 'oauth2callback', 'download-*', 'claim-form-download', 'claims-feedback-form', 'autobookstackLogin'], 'Cors', 'SecurityInputFilter', 'GlobalPostFileUploadGuard', From 80e47ce1c9ed6c1c7d4fe9e590492040c5804a12 Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Mon, 12 Jan 2026 12:37:48 +0530 Subject: [PATCH 4/4] gwm : mpin message changed --- app/Controllers/RestAuthenticationController.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 41a716d..235f86a 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -978,6 +978,12 @@ class RestAuthenticationController extends AdminController $old_mpin = $this->request->getJSON()->old_mpin; $mpin = $this->request->getJSON()->new_mpin; + if($old_mpin == $mpin) + { + $result = ['mpin_verification' => false , 'message' => "New MPIN must be different from the old MPIN"]; + return $this->respond(['status' => 'failed','code' => 404,'data' => $result],200); + } + $empdata = RestAuthHelper::getPreAndPostDataByEmailOrMobile(['email_id' => $email_id, 'mobile_number' => $mobile_number, 'old_mpin' => $old_mpin ]); // print_r($empdata); die; @@ -986,7 +992,7 @@ class RestAuthenticationController extends AdminController log_message('error', ' '); log_message('error', '************************ PRE END ********************************'); - $result = ['mpin_verification' => false , 'message' => "Wrong Mpin"]; + $result = ['mpin_verification' => false , 'message' => "Old MPIN is incorrect"]; return $this->respond(['status' => 'failed','code' => 404,'data' => $result],200); }