How to resolve encoded URI characters in CodeIgniter urls?

I am using CodeIgniter 1.7.1 . My allowed URI characters are set as such:

$config['permitted_uri_chars'] = 'az 0-9~%.:_()@&\-'; 

When I type in an address, for example http://website.com/index.php/controller/method/test%21 , the page does not load and gives me an error:

Igniter Code: An error has been detected. The URI you sent is forbidden characters.

I do not understand. %20 (space) is allowed, but %21 (exclamation point) is not.

+4
source share
2 answers

% 21 to make out! in the encoder. Therefore codeigniter does not support this, please! to the allowed uri cofig file:

 $config['permitted_uri_chars'] = 'az 0-9~%.:_()@&\-!'; 
+5
source

try doing it with this that should work

 \\+ 
-1
source

Source: https://habr.com/ru/post/1410782/


All Articles