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:
PhilandClaude Opus 5.5 committed 2026-11-03 11:23:36 -07:00
1 parent 409b8b31b4
commit b2043286fa
17 files changed
+825 -151

No files matched your search

+4 -1
View File
@@ -374,7 +374,10 @@ def create_note(
# Reply context fetch failure should not prevent note creation
current_app.logger.warning(f"Failed to fetch reply context for {in_reply_to}: {e}")
_websub_changed(note)
# A note with photos is announced when they're attached
# (attach_media_to_note), so subscribers never get it without them
if not has_media:
_websub_changed(note)
return note