fix(server): trust forwarded headers only from known proxies
In TLS mode proxy the server accepted X-Forwarded-For/Proto/Host from any peer, so a client reaching the HTTP port directly could pick a new address per sign-in (defeating the 5/min/IP limit), forge audit addresses and claim HTTPS; the admin never warned (SRS-03, SRV-3). Forwarded headers now count only from TITANO_TRUSTED_PROXIES (addresses or CIDR networks; default loopback, 10/8, 172.16/12, 192.168/16, fc00::/7), and the Dashboard and Settings show a "Not via proxy" chip with a tooltip when a page did not come through a trusted proxy over HTTPS (ProxyWarning in DashboardDto and ServerSettingsDto). TITANO_PUBLIC_HTTP_PORT and TITANO_PUBLIC_HTTPS_PORT name the ports clients reach when a container's ports are published as other host ports: the admin's HTTP-to-HTTPS redirect and the LAN beacon use them instead of the bound container ports (DOCKER-4, DOCKER-5). --help lists TITANO_LOG_LEVEL, the new variables and the container's PUID, PGID and TZ (DOCKER-7); a test keeps it in step with the variables the server reads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
17 files changed
+340
-22
No files matched your search
@@ -288,6 +288,8 @@
|
||||
<data name="Admin.Settings.Network" xml:space="preserve"><value>Network and TLS</value></data>
|
||||
<data name="Admin.Settings.PemMissing" xml:space="preserve"><value>The PEM file was not found; enter its full path on the server.</value><comment>long</comment></data>
|
||||
<data name="Admin.Settings.PemOnly.Tip" xml:space="preserve"><value>Used only in Own certificate mode</value></data>
|
||||
<data name="Admin.Settings.ProxyBypassed" xml:space="preserve"><value>Not via proxy</value></data>
|
||||
<data name="Admin.Settings.ProxyBypassed.Tip" xml:space="preserve"><value>TLS mode is Reverse proxy, but this page did not come through a trusted proxy over HTTPS. Open it through your proxy, or add the proxy's address to TITANO_TRUSTED_PROXIES.</value></data>
|
||||
<data name="Admin.Settings.Restart" xml:space="preserve"><value>Restart required</value></data>
|
||||
<data name="Admin.Settings.Restart.Tip" xml:space="preserve"><value>Saved ports, TLS, workers, chunk size or job history apply after a restart</value></data>
|
||||
<data name="Admin.Settings.Server" xml:space="preserve"><value>Server</value></data>
|
||||
|
||||
@@ -288,6 +288,8 @@
|
||||
<data name="Admin.Settings.Network" xml:space="preserve"><value>Rete e TLS</value></data>
|
||||
<data name="Admin.Settings.PemMissing" xml:space="preserve"><value>File PEM non trovato; inserisci il percorso completo sul server.</value></data>
|
||||
<data name="Admin.Settings.PemOnly.Tip" xml:space="preserve"><value>Usato solo in modalità Certificato proprio</value></data>
|
||||
<data name="Admin.Settings.ProxyBypassed" xml:space="preserve"><value>Senza proxy</value></data>
|
||||
<data name="Admin.Settings.ProxyBypassed.Tip" xml:space="preserve"><value>La modalità TLS è Reverse proxy, ma questa pagina non è arrivata da un proxy attendibile in HTTPS. Aprila tramite il proxy o aggiungi l'indirizzo del proxy a TITANO_TRUSTED_PROXIES.</value></data>
|
||||
<data name="Admin.Settings.Restart" xml:space="preserve"><value>Riavvio richiesto</value></data>
|
||||
<data name="Admin.Settings.Restart.Tip" xml:space="preserve"><value>Porte, TLS, worker, dimensione blocchi o cronologia job salvati valgono dopo un riavvio</value></data>
|
||||
<data name="Admin.Settings.Server" xml:space="preserve"><value>Server</value></data>
|
||||
|
||||
Reference in new issue
Block a user