CodeIgniter Forums
CLI and Permitted URI Characters - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19)
+--- Thread: CLI and Permitted URI Characters (/showthread.php?tid=75562)



CLI and Permitted URI Characters - leorojas22 - 02-21-2020

I was working on a cli function and one of the parameters I was trying to use had some disallowed characters that I have set.  I googled to see if it's possible to disable this check when making a request through the cli.  I found this github issue: https://github.com/bcit-ci/CodeIgniter/issues/4085 and there's a commit that looked like solved it.  But it doesn't look like it was merged into the master branch?  Was there a reason for that?  Someone also gave an example of setting up a MY_URI class to override this but was wondering if the fix to the core was going to be merged into a release version?

Thanks!


RE: CLI and Permitted URI Characters - jreklund - 02-21-2020

The code have changed a bit since that commit, and it's there. Always loading it.

But as this is PHP you can just change your config file to this (not tested).

PHP Code:
$config['permitted_uri_chars'] = is_cli() ? NULL 'a-z 0-9~%.:_\-'