# v2.10.1: WebSub hardening (implementation report) > Reconstructed on 2026-11-03 from the changelog and git history. Commit `b204328`. ## Design [ADR-071](../../decisions/ADR-071-websub.md), "Amendments (v2.10.1)", from an adversarial review of v2.10.0 against the W3C Recommendation. ## Changes - `starpunk/websub_worker.py`: each intent/delivery handled in its own try block (an error drops a verification or retries a delivery, never stops the worker); failing subscribers kept until lease end; DNS failures (`ResolutionError`) and render errors retried; a topic rendering 404/410 sends `hub.mode=denied` and ends its subscriptions; each topic rendered once per pass; verification replies over 4 KB fail. - `starpunk/webmention_ssrf.py`: `_Watchdog` closes the client when the whole exchange exceeds the time limit (10 s), for `safe_get` and `safe_post`, so webmention fetching benefits too; `ResolutionError` distinguishes DNS failures. - `starpunk/websub.py`: spec 5.1 fixes (unreserved percent-decoding, requested topic echoed, lease/secret ignored on unsubscribe, empty secret refused); callback validation (printable, ≤2,048 chars, not this site, port 80/443/≥1024, IDNA host); limits count pending requests per callback address, at most 200 pending; likes only queue `/likes` and tag pages; unsubscribe works with an external hub. - `starpunk/routes/websub.py`: case-insensitive Content-Type check. - `migrations/017_websub_hardening.sql`: `request_id`, `requested_topic`, `callback_ip` on intents; `callback_ip` on subscriptions. - `starpunk/media.py`: `attach_media_to_note` announces the note (photos are in the first delivery); `starpunk/notes.py`/`micropub.py` skip the early announcement for notes with photos. - `starpunk/feeds/cache.py`, `starpunk/routes/public.py`: cache key and weak ETag from format + notes checksum incl. `content_version` (stable across processes); `/feed` sends `Vary: Accept`. - `.env.example`: `TRUSTED_PROXY` and the WebSub settings documented. ## Tests `tests/test_websub_hardening.py` (24 tests, one or more per amendment: oversized challenge, bad and IDN callbacks, per-item errors, photo notes, slow callback cut off, lease kept, DNS/render retries, denial for gone topics, pending-request limits, spec 5.1 cases, request-id race, render once per pass, likes, stable ETag, `Vary: Accept`). ## Verification Deployed to production; the websub.rocks publisher test passed again. ## Notes Per-client rate limits only work behind Caddy with `TRUSTED_PROXY=true`.