- PHPMailer von 6.9.3 auf 7.0.2 aktualisiert - Zentrale config.php mit .env-Unterstützung - forms/config.php entfernt (jetzt ../config.php) - .htaccess Schutz für Konfigurationsdateien - Erweiterte Sicherheitsfeatures in contact.php - Dokumentation: SECURITY.md und PHPMAILER-UPDATE.md Sicherheitsverbesserungen: - XSS-Schutz und Header-Injection-Schutz - Verbesserte Input-Validierung - Rate Limiting optimiert - reCAPTCHA mit SSL-Verifizierung - Datei-Upload-Sicherheit - .env für sensible Daten (nicht in Git)
49 lines
1003 B
ApacheConf
49 lines
1003 B
ApacheConf
# Schütze config.php und andere sensible Dateien
|
|
<Files "config.php">
|
|
Require all denied
|
|
</Files>
|
|
|
|
<Files ".env">
|
|
Require all denied
|
|
</Files>
|
|
|
|
<Files ".env.*">
|
|
Require all denied
|
|
</Files>
|
|
|
|
<Files "config.php.backup">
|
|
Require all denied
|
|
</Files>
|
|
|
|
<Files "test-*.php">
|
|
Require all denied
|
|
</Files>
|
|
|
|
# Verhindere Directory Listing
|
|
Options -Indexes
|
|
|
|
# Blockiere Zugriff auf Backup-Dateien
|
|
<FilesMatch "\.(bak|backup|old|orig|save|swp|tmp)$">
|
|
Require all denied
|
|
</FilesMatch>
|
|
|
|
# Verhindere Zugriff auf versteckte Dateien
|
|
<FilesMatch "^\.">
|
|
Require all denied
|
|
</FilesMatch>
|
|
|
|
# PHP-Sicherheitseinstellungen
|
|
<IfModule mod_php7.c>
|
|
php_flag display_errors off
|
|
php_flag log_errors on
|
|
php_value upload_max_filesize 20M
|
|
php_value post_max_size 20M
|
|
</IfModule>
|
|
|
|
# Zusätzliche Sicherheits-Header
|
|
<IfModule mod_headers.c>
|
|
Header set X-Content-Type-Options "nosniff"
|
|
Header set X-Frame-Options "SAMEORIGIN"
|
|
Header set X-XSS-Protection "1; mode=block"
|
|
</IfModule>
|