From 084ee83ec33de2a4d0f476bb2f54b60485b5a22d Mon Sep 17 00:00:00 2001 From: ricki Date: Fri, 2 Aug 2024 18:07:17 +0700 Subject: [PATCH 1/2] hapus "alphanumeric(_post('username'), "+_.@-")" agar bisa digunakan untuk autologin menggunakan mac address hotspot --- system/controllers/customers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/controllers/customers.php b/system/controllers/customers.php index 8328c7b9..3f2aff72 100644 --- a/system/controllers/customers.php +++ b/system/controllers/customers.php @@ -360,7 +360,7 @@ switch ($action) { break; case 'add-post': - $username = alphanumeric(_post('username'), "+_.@-"); + $username = _post('username'); $fullname = _post('fullname'); $password = trim(_post('password')); $pppoe_password = trim(_post('pppoe_password')); @@ -480,7 +480,7 @@ switch ($action) { break; case 'edit-post': - $username = alphanumeric(_post('username'), "+_.@-"); + $username = _post('username'); $fullname = _post('fullname'); $account_type = _post('account_type'); $password = trim(_post('password')); From f5042cc665c2e65a4bfd7fbae9e3c1ddf46dbd96 Mon Sep 17 00:00:00 2001 From: ricki Date: Fri, 2 Aug 2024 18:13:35 +0700 Subject: [PATCH 2/2] Refactor username validation to allow special characters for autologin using MAC address hotspot --- system/controllers/customers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/controllers/customers.php b/system/controllers/customers.php index 3f2aff72..12d57000 100644 --- a/system/controllers/customers.php +++ b/system/controllers/customers.php @@ -360,7 +360,7 @@ switch ($action) { break; case 'add-post': - $username = _post('username'); + $username = alphanumeric(_post('username'), ":+_.@-"); $fullname = _post('fullname'); $password = trim(_post('password')); $pppoe_password = trim(_post('pppoe_password')); @@ -480,7 +480,7 @@ switch ($action) { break; case 'edit-post': - $username = _post('username'); + $username = alphanumeric(_post('username'), ":+_.@-"); $fullname = _post('fullname'); $account_type = _post('account_type'); $password = trim(_post('password'));