Исправление ошибки SA-CORE-2013-003

Часто после обновления Drupal до свежей версии на странице статуса появляются предупреждения о не безопасной настройке файловой системы:


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

На странице http://drupal.org/SA-CORE-2013-003 приведено подробное описание уязвимости Drupal и методов решения на английском. Для устранения этой уязвимости и предупреждения связанных с ней проблем, необходимо для папок с общедоступными файлами, временными и приватными файлами в файл .htaccess, находящийся в этих папках, прописать следующие строки: для Drupal 6


# 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

  # Override the handler again if we're run later in the evaluation list.
  SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003


# If we know how to do it safely, disable the PHP engine entirely.

  php_flag engine off

# PHP 4, Apache 1.

  php_flag engine off

# PHP 4, Apache 2.

  php_flag engine off

для Drupal 7


# 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

  # Override the handler again if we're run later in the evaluation list.
  SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003


# If we know how to do it safely, disable the PHP engine entirely.

  php_flag engine off

Так же для папок с приватными и временными файлами добавить строку


Deny from all