Codeigniter - URI Disallowed characters

邮差的信 提交于 2019-12-12 20:55:57

问题


I have seen several other questions similar to this but I can't find a solution to my specific problem.

I am getting error The URI you submitted has disallowed characters. When I send the following request:

 http://myrul/login/createNewPassword/reset_token/pwd70xkainz500d57311rli/username/contact%40email.com

Now I have identified that the % in my username is what is triggering the error but I have that allowed in my config file.

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';

I though this should allow % to be allowed in the url. If I set config as

$config['permitted_uri_chars'] = '';

Works fine. Is the config string not correct? Or is there another variation of the string I should be using?


回答1:


contact%40email.com is actually contact@email.com, but urlencoded.

So, the disallowed character you are sending is @, not %.

If you add "@" to your permitted_uri_chars you should be alright.

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-@';


来源:https://stackoverflow.com/questions/42072802/codeigniter-uri-disallowed-characters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!