Files
StarPunk/migrations/017_websub_hardening.sql
T
PhilandClaude Opus 5.5 b2043286fa 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>
2026-11-03 11:23:36 -07:00

13 lines
754 B
SQL

-- 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);