.htaccess dans le dossier des fichiers privés

Suite à maj rapide vers 7.24 (de la 7.23) chez Gandi, j'ai 2 avertissements à admin/reports/status "Not fully protected" sur (voir https://drupal.org/SA-CORE-2013-003):

  • Public files directory files
  • temp /lamp0/tmp (chez Gandi)

 

Erreur dans watchdog:

  • Warning : file_put_contents(private:///.htaccess): failed to open stream: "DrupalPrivateStreamWrapper::stream_open" call failed dans file_create_htaccess() (ligne 494 dans ...includes/file.inc).
  • Avertissement de sécurité : impossible de créer le fichier .htaccess. Créez un fichier .htaccess dans le répertoire private:// contenant les lignes suivantes :

Deny from all

# 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>

La conf (admin/config/media/file-system) est à ../../../../../private

cf https://www.drupal.org/SA-CORE-2013-003