CI 4.6.0 and myth-auth 1.2.1 - fill placeholders problem |
Hi
I recently updated codeigniter to version 4.6.0 and myth-auth to 1.2.1. After the update the whole app is working fine, but unfortunately adding and editing groups and permissions does not work. I get this error: Quote:My PermissionController.php file: PHP Code: <?php My PermissionModel.php file: PHP Code: <?php It seems to me that the problem is in the PermissionModel file from the myth-auth library, where there are such rules: PHP Code: protected $validationRules = [ According to docs: Quote:Since v4.3.5, you must set the validation rules for the placeholder field (the id field in the sample code above) for security reasons. Because attackers can send any data to your application. I'm not sure if you can do rules this way and if this is the cause of the problem (name field in name field rules). I made temporary something like this in my PermissionModel.php file and everything working fine, but Im not sure if this is correct way: PHP Code: public function save($data): bool Thank you in advance for your help. |
Welcome Guest, Not a member yet? Register Sign In |