security: Proxy-Vertrauen nur noch lokal, HSTS in Produktion, Tests ohne echte ntfy-Pushes
Live-Prüfung 08.10.2026: nginx beantwortet die Anfragen direkt (kein CDN, kein vorgeschalteter Proxy), die App vertraute aber jedem Proxy (trustProxies at '*'). Jeder Client konnte per X-Forwarded-For seine IP vorgeben und damit IP-Limits bei Login und Passwort-Reset umgehen sowie IP-Protokolle fälschen. Jetzt steuert config/trustedproxy.php das Vertrauen: lokal (Traefik) weiterhin '*', sonst keinem Proxy; ein späteres CDN kommt über TRUSTED_PROXIES dazu. HSTS fehlte auf Live. SecurityHeaders setzt Strict-Transport-Security auf HTTPS-Antworten, standardmäßig nur in Produktion (max-age 1 Jahr, bewusst ohne includeSubDomains/preload). phpunit.xml leert MONITORING_NTFY_*, damit Testläufe keine echten Push-Nachrichten mehr auslösen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f693226d4a
commit
3def447f51
7 changed files with 121 additions and 3 deletions
|
|
@ -346,3 +346,10 @@ IMAGE_PRECHECK=false
|
|||
IMAGE_PRECHECK_STAGE=1
|
||||
# IMAGE_PRECHECK_MODEL=
|
||||
# IMAGE_PRECHECK_DOWNGRADE=
|
||||
|
||||
# Proxy-Vertrauen: leer = keinem Proxy (Live, nginx direkt). Lokal ohne Angabe `*` (Traefik).
|
||||
# Steht ein Proxy/CDN davor, dessen Adressbereiche kommagetrennt eintragen.
|
||||
# TRUSTED_PROXIES=
|
||||
# HSTS: ohne Angabe nur bei APP_ENV=production an, max-age 1 Jahr.
|
||||
# SECURITY_HSTS=
|
||||
# SECURITY_HSTS_MAX_AGE=31536000
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue