在檢閱與此問題相關的任何 Apache 程式碼時,我們發現了許多問題。其中許多並不是 Apache 的 Bug,而是 Apache 可以執行更多的地方,以避免容易受到跨站指令碼安全性問題影響。這些變更並不會修正 Apache 本身的任何安全性漏洞,從而直接危害伺服器,但它們專注於 Apache 與用戶端之間的互動。
以下是目前已知問題和修正程式(如果可用)的摘要。這些資訊將隨著取得資訊和時間允許而擴充。
printenv
CGI 程式碼舊版本沒有正確編碼其輸出。如果您在系統上擁有其中一個,此問題並影響您的網站,您應該停用此 CGI。printenv
和 test-cgi
會傳送 MIME 類型為 text/plain 的內容,這表示不需要或無法編碼。這是為了修正 printenv
未正確編碼其輸出的問題,而於 Apache 1.3.11 中變更的。不幸的是,Microsoft Internet Explorer 不會尊重那個 MIME 類型,並會不正確地將輸出來處理為猜測的 HTML。此安全性問題已經回報給 Microsoft。目前,建議的解決方法是,如果發問題影響到您,只需從您的網站中移掉 printenv
和 test-cgi
程式碼。mod_status
未在他們的輸出上設定明確的字元集。使用 AddDefaultCharset 指令可以解決這個問題。未設定明確的字元集的模組通常不會讓使用者存取,而且它們被認為不會造成重大的風險。隨著時間許可,這些修正程式將會擴充。這些修補程式會出現在針對 Apache 1.3.11 的最新 Apache 修補程式 中。
*) Add an explicit charset=iso-8859-1 to pages generated by ap_send_error_response(), such as the default 404 page. [Marc Slemko] *) Add the AddDefaultCharset and AddDefaultCharsetName directives. These allow you to tell Apache to specify the given character set on any document that does not have one explicitly specified in the headers. [Marc Slemko] *) Properly escape various messages output to the client from a number of modules and places in the core code. [Marc Slemko] *) Change mod_actions, mod_autoindex, mod_expires, and mod_log_config to not consider any parameters such as charset when making decisions based on content type. This does remove some functionality for some users, but means that when these modules are configured to do particular things with particular MIME types, the charset should not be included. A better way of addressing this for users who want to set things on a per charset basis is necessary in the future. [Marc Slemko] *) mod_include now entity encodes output from "printenv" and "echo var" by default. The encoding for "echo var" can be set to URL encoding or no encoding using the new "encoding" attribute to the echo tag. [Marc Slemko]