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
@@ -169,7 +169,11 @@ class FeedCache:
|
||||
- Adds new entry or updates existing entry
|
||||
"""
|
||||
cache_key = self._generate_cache_key(format_name, notes_checksum)
|
||||
etag = self._generate_etag(content)
|
||||
# From what the feed is made of, not its bytes: the bytes include a
|
||||
# build time, so each server process made a different ETag and
|
||||
# conditional requests rarely matched (v2.10.1). Weak ETag: same
|
||||
# notes, semantically the same feed.
|
||||
etag = self._generate_etag(f"{format_name}:{notes_checksum}")
|
||||
timestamp = time.time()
|
||||
|
||||
# Evict if cache is full
|
||||
|
||||
Reference in new issue
Block a user