• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
permitted_uri_chars and urlencode()

#1
[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 ;-)

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

#3
[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 '='.

#4
[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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.