Welcome Guest, Not a member yet? Register   Sign In
permitted_uri_chars rejects all non-ASCII hex values
#1

[eluser]sawatdee[/eluser]
One of my controllers needs to accept non-ASCII strings as a parameter. But when I pass urlencoded non-ASCII characters over the URL, I get the dreaded error "The URI you submitted has disallowed characters".

So I ran a simple test. I tried using "% 68 % 6F" (hex representation of the string "ho") as the URL segment for that parameter (I typed it right into the URL) and it worked fine. Then I kept the exact same URL but I replaced that segment with the UTF-8 encoding of a single Arabic character "% D8 % A7", and it returned the error message. This error message comes from CodeIgniter, so my controller code was never even called.

My configuration for permitted_uri_chars is set to the default. I am not using a .htaccess file and I am not rerouting for that controller.

Since the same URL works with " % 68 % 6F" but not with " % D8 % A7", the problem could not be any characters in my URL. The problem is that it is refusing to accept properly encoded hex values that happen to be out of ASCII range.

I ran several more tests and found that "% 7E" (the last printable ASCII character) works, but nothing greater than that value works. The URL should accept any hex value that is properly encoded for a URL, regardless of what characters those values represent. For example, "% 7F" (the ASCII delete character) could be part of a printable character in some other charset.

I have not had time to look at the CodeIgniter code to find the bug, but the permitted_uri_chars code is definitely not behaving correctly.


Messages In This Thread
permitted_uri_chars rejects all non-ASCII hex values - by El Forum - 03-05-2008, 02:15 PM
permitted_uri_chars rejects all non-ASCII hex values - by El Forum - 03-05-2008, 03:03 PM
permitted_uri_chars rejects all non-ASCII hex values - by El Forum - 03-05-2008, 03:11 PM
permitted_uri_chars rejects all non-ASCII hex values - by El Forum - 03-05-2008, 03:24 PM
permitted_uri_chars rejects all non-ASCII hex values - by El Forum - 03-05-2008, 03:28 PM
permitted_uri_chars rejects all non-ASCII hex values - by El Forum - 03-05-2008, 03:34 PM
permitted_uri_chars rejects all non-ASCII hex values - by El Forum - 03-05-2008, 03:36 PM
permitted_uri_chars rejects all non-ASCII hex values - by El Forum - 03-06-2008, 12:37 AM
permitted_uri_chars rejects all non-ASCII hex values - by El Forum - 03-06-2008, 01:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB