更新Drupal後報告出現錯誤See http://drupal.org/SA-CORE-2013-003 for information...

將Drupal 7.22更新到 7.26後,report報告裏出現兩個錯誤:

 

Public files directory                                                                           Not fully protected
See http://drupal.org/SA-CORE-2013-003 for information about the recommended .htaccess file which should be added to the sites/default/files directory to help protect against arbitrary code execution.

 

Temporary files directory                                                                    Not fully protected
See http://drupal.org/SA-CORE-2013-003 for information about the recommended .htaccess file which should be added to the c:\windows\temp directory to help protect against arbitrary code execution.

 

點開See後面的連接,內容有點多,不管其他的,按下面的方法處理後錯誤消失

看上面的錯誤,大意是說公共文件路徑和臨時文件路徑沒有完全保護,叫修改.htaccess文件後添加到sites/default/files目錄和c:\windows\temp目錄。

 

找到sites/default/files目錄下,發現有一個.htaccess文件,去掉寫保護,用寫字板打開,替換下面的內容,然後保存,並把這個文件複製到c:\windows\temp臨時文件目錄下即可。

 

# Turn off all options we don't need.
Options None
Options +FollowSymLinks

# Set the catch-all handler to prevent scripts from being executed.
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
<Files *>
# Override the handler again if we're run later in the evaluation list.
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
</Files>

# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
php_flag engine off
</IfModule>

 

發佈了23 篇原創文章 · 獲贊 1 · 訪問量 5萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章