diff options
| author | Dennis Fink | 2026-10-30 20:31:43 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-10-30 20:31:43 +0100 |
| commit | 13a9d9ddce09230017699bc34ac3bf08ed2f84ed (patch) | |
| tree | 3715bd13439a61a8cc6896581811a30b62ac1b16 /contrib/webmentions-ssg.example.cfg | |
| parent | 8c561e702ed15022b17eae81e4185448c021e1cb (diff) | |
| download | webmentions-ssg-13a9d9ddce09230017699bc34ac3bf08ed2f84ed.tar.gz webmentions-ssg-13a9d9ddce09230017699bc34ac3bf08ed2f84ed.zip | |
fix(core): prevent DNS rebinding in HTTP requests
Pin outbound connections to validated public IP addresses so DNS changes
cannot redirect receiver or sender requests onto private or link-local
networks.
Apply the same protection across redirects, add an overall request
deadline, and keep DNS resolution out of synchronous endpoint form
validation.
Diffstat (limited to 'contrib/webmentions-ssg.example.cfg')
| -rw-r--r-- | contrib/webmentions-ssg.example.cfg | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/webmentions-ssg.example.cfg b/contrib/webmentions-ssg.example.cfg index bf363b8..02b0744 100644 --- a/contrib/webmentions-ssg.example.cfg +++ b/contrib/webmentions-ssg.example.cfg @@ -44,8 +44,14 @@ LOGFILE_BACKUP_COUNT = 10 # Webmention. Include each hostname you serve; wildcards are not supported. ALLOWED_HOSTNAMES = {"example.com", "www.example.com"} +# Defense in depth: restrict the Huey worker service account with outbound +# firewall/network-policy rules that block loopback, RFC1918, link-local, ULA, +# and cloud metadata ranges, including IPv6. The application also pins +# validated DNS IPs, but deployment-level filtering is still necessary. + # Limits for fetching/verifying incoming sources. -REQUEST_TIMEOUT = 5.0 # seconds; also used for outgoing requests +REQUEST_TIMEOUT = 5.0 # seconds per socket operation (both directions) +REQUEST_TOTAL_TIMEOUT = 30.0 # seconds overall, including DNS, redirects and body MAX_REDIRECTS = 20 # also used for outgoing requests MAX_SOURCE_BYTES = 1_000_000 # Requeue stuck verifications and lost queued tasks after 15 minutes. |
