feat: CALDAV_ALLOWED_CIDRS Whitelist für interne CalDAV/Nextcloud-Server
Interne Nextcloud-Instanzen im LAN können jetzt per .env-Variable von der SSRF-Blockliste ausgenommen werden. Beispiel in .env: CALDAV_ALLOWED_CIDRS=192.168.1.0/24,10.10.5.50/32 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,12 @@ class Settings(BaseSettings):
|
||||
first_superadmin_email: str = ""
|
||||
first_superadmin_password: str = ""
|
||||
|
||||
# CalDAV / outbound HTTP
|
||||
# Kommaseparierte CIDR-Whitelist für interne CalDAV-Server (z.B. Nextcloud im LAN).
|
||||
# Diese CIDRs sind vom SSRF-Schutz ausgenommen.
|
||||
# Beispiel: CALDAV_ALLOWED_CIDRS=192.168.1.0/24,10.10.5.50/32
|
||||
caldav_allowed_cidrs: list[str] = []
|
||||
|
||||
@model_validator(mode='after')
|
||||
def validate_secret_key(self):
|
||||
if self.app_env == 'production' and self.secret_key == 'change-me-in-production':
|
||||
|
||||
Reference in New Issue
Block a user