htaccess e SA-CORE-2013-003 Guida Drupal 8 mancante
Ho creato la directory dei file privati per Drupal 8.
Questa directory è ( come assolutamente raccomandato ) fuori dalla cartella public_html per ovvie ragioni di sicurezza.
Ora appena creata si presenta ilproblema.
Drupal riporta l'errore come da allegato.
Mi dice di fare riferimento a questa pagina,
https://www.drupal.org/forum/newsletters/security-advisories-for-drupal-...
Ma cosa dovrei fare? Crare un file htaccess anche per i file privati e poi commentarlo usando l'esempio di Drupal 7?
Per Dupal 8 non c'è nulla?
Allegato | Dimensione |
---|---|
Errore.PNG | 14.63 KB |
Risposte
E' segnalata su molte issues
E' segnalata su molte issues correlate:
https://www.drupal.org/project/drupal/issues/2953336
https://www.drupal.org/project/drupal/issues/2906490
https://www.drupal.org/project/drupal/issues/2141065
sembra sia un'indicazione sbagliata del sistema .. il file .htaccess nel filesystem privato dovrebbe essere rigenerato al bisogno, se non presente. Ovviamente la directory deve esistere, essere scrivibile ed essere configurata correttamente all'interno del file settings.php. Nel caso tutte questi punti siano già a posto, nelle issue sopra trovi indicazioni sul contenuto del file .htaccess da inserire.
Per comodità:
# Deny all requests from Apache 2.4+.
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
# Deny all requests from Apache 2.0-2.2.
<IfModule !mod_authz_core.c>
Deny from all
</IfModule>
# Turn off all options we don't need.
Options -Indexes -ExecCGI -Includes -MultiViews
# 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>
<IfModule mod_php7.c>
php_flag engine off
</IfModule>