这就是问题:当请求像- http://server/path/to/file.html?param=../../something/something这样的url时,我得到了响应:
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 )中删除一个'../‘的实例,我会得到请求的页面。它只在两个或更多的‘../’上给出错误。
这是在一些托管服务器上,同样的事情在我的本地服务器(LAMP,WAMP)上也没有错误。我想这是关于apache配置的,但我不知道要检查哪些选项。
Apache2.2.14 (Unix)存在问题,安装了PHP (但当我请求纯HTML文件时,它显然与PHP没有任何关系),mod_rewrite规则被禁用(所请求文件的路径中没有.htaccess文件)。
关于如何在查询字符串中成功传递多个‘../’,有什么想法吗?
发布于 2010-08-03 08:35:35
事实证明,主机提供商默认情况下启用了安全预防措施-不允许“回溯路径”,但我不确定是哪一个,以及它设置在哪里。
https://stackoverflow.com/questions/2389418
复制相似问题