2010-03-05 61 views
0

这里的问题:请求的url喜欢当 - http://server/path/to/file.html?param=../../something/something我得到的回应:阿帕奇:多个../查询字符串=内部服务器错误(错误500)

500 Internal Server Error 
The server encountered an internal error or misconfiguration and was unable to complete your request. 
... 
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. 

日志说:

xxx.xxx.xxx.xxx - - [05/Mar/2010:13:43:29 -0500] "GET /path/to/file.html?param=../../something/something HTTP/1.1" 404 - "-" ... 

如果我删除查询字符串中的'../'的一个实例(请求http://server/path/to/file.html?param=../something/something),我得到reqested页面。它只在两个或更多的'../'上给出错误。

这是在一些托管服务器上,同样的事情给我的本地服务器(LAMP,WAMP)没有错误。我想这是关于Apache配置,但我不知道要检查什么选项。如果Apache2.2.14(Unix)有问题,安装了PHP(但是当我请求普通的HTML文件时,它显然与PHP没有任何关系),mod_rewrite规则被禁用(没有.htaccess请求文件路径中的文件)。

有关如何成功地在查询字符串中传递多个'../'的任何想法?

回答

1

事实证明,托管服务提供商默认启用了安全预防措施 - 不允许“backpaths”,但我不确定哪一个,以及它的设置位置。