fix: WebSub hardening from the adversarial review (v2.10.1)
- Per-item error handling in the worker; hard time limits on requests - Notes with photos announced after attach; feed cache/ETag follow content_version - Keep failing subscriptions until lease end; retry DNS and render errors; hub.mode=denied for gone topics - Spec 5.1: decode unreserved chars, echo requested topic, ignore lease and secret on unsubscribe, case-insensitive Content-Type, refuse empty secret - Limits count pending requests per callback address; callback validation; request_id guards the verification race (migration 017) - Render once per topic per pass; likes only push /likes; Vary: Accept Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
409b8b31b4
commit
b2043286fa
17 files changed
+825
-151
No files matched your search
@@ -0,0 +1,12 @@
|
||||
-- Migration 017: WebSub hardening (v2.10.1)
|
||||
-- request_id: each subscription request gets its own id, so verifying an
|
||||
-- older request can't consume a newer one for the same topic and callback.
|
||||
-- requested_topic: the hub.topic exactly as sent; verification echoes it.
|
||||
-- callback_ip: address the callback resolved to, for per-address limits.
|
||||
|
||||
ALTER TABLE websub_intents ADD COLUMN request_id TEXT;
|
||||
ALTER TABLE websub_intents ADD COLUMN requested_topic TEXT;
|
||||
ALTER TABLE websub_intents ADD COLUMN callback_ip TEXT;
|
||||
ALTER TABLE websub_subscriptions ADD COLUMN callback_ip TEXT;
|
||||
CREATE INDEX IF NOT EXISTS idx_websub_subscriptions_ip ON websub_subscriptions(callback_ip);
|
||||
CREATE INDEX IF NOT EXISTS idx_websub_intents_ip ON websub_intents(callback_ip);
|
||||
Reference in new issue
Block a user