CodeIgniter Forums
permitted_uri_chars and urlencode() - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: permitted_uri_chars and urlencode() (/showthread.php?tid=5484)



permitted_uri_chars and urlencode() - El Forum - 01-23-2008

[eluser]PoWah[/eluser]
I am doing queries depending on URL and I have faced a problem with "The URI you submitted has disallowed characters.". My URL is encoded with urlencode() and for example looks like http://localhost/app/users/browse/email/aurimas% 40/ (i left unneeded space `cause this forum converts special chars)

'% 40' is encoded '@' character, but '% 40' doesn't contain any disallowed character. Why I see this error? By the way, I don't like the idea of changing permitted_uri_chars setting in config.

Point me to the right direction to overcome this problem. Thanks in advance ;-)


permitted_uri_chars and urlencode() - El Forum - 03-05-2008

[eluser]Nious99[/eluser]
I have the same problem...


permitted_uri_chars and urlencode() - El Forum - 03-05-2008

[eluser]PoWah[/eluser]
there is no quick overcome .. so try using base64_encode (i've done so). But with this you will need to add 2 more charecters to perrmited_uri_chars directive '|' and '='.


permitted_uri_chars and urlencode() - El Forum - 03-05-2008

[eluser]Nious99[/eluser]
Thank you

I found another solution but it's less secured. In Router.php, function _filter_uri, I put a rawurlencode to the $str variable. Now it works but you can put any character in your URI.