2010-03-05 47 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」,但我不確定哪一個,以及它的設置位置。