Forbidden You don't have permission to access on searching a special character

别说谁变了你拦得住时间么 提交于 2020-01-07 03:36:06

问题


I am supporting a java application which has a search bar which matches the keywords and gets the results from the cache.

The application runs in Tomcat and has a Apache web server too.

There is an issue while searching aaa' the special character ' is causing the problem and i get to

Forbidden You don't have permission to access /xx/xx/xxxx.jsp

The search is fine in local setup with the abscence of Web Server. As i saw some posts suggesting the issue could be caused by Web server config.

What are the possibilities?

Your help is highly appreciated.

Thanks, Nagaraja JB


回答1:


Apache web-server's security configuration must be causing this. Look into the web server logs, you will find rule code/name which is triggered because of these sequence of characters. Disabling rule is one of the options to make this work but not always a good idea.




回答2:


The issue was not an issue it is a secutity constraint by the apache web server or FireWall rule to protect from cross site sctipting or sql injection using %27 (single quote). I used POST method instead of using GET method to send request. That is the solution for my case.



来源:https://stackoverflow.com/questions/42300295/forbidden-you-dont-have-permission-to-access-on-searching-a-special-character

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