feat: W3C Webmention compliance (v2.7.0)

Sending: RFC 8288 Link header parsing, rel token matching and document
order for <link>/<a>, endpoint re-discovery on every send, re-send to
previous targets on update/delete/undelete, 410 Gone for deleted notes,
no redirect following on the POST, 429 retried.

Receiving: exact target match per media type, Accept header, final URL
for relative links, only published notes accepted, fragments ignored,
moderation kept on updates, transient errors keep valid mentions.

Security: every redirect hop SSRF-checked, all resolved addresses
checked, broader blocklist, total time and size limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
PhilandClaude Opus 5.5 committed 2026-11-03 08:07:04 -07:00
1 parent 0cfc9965df
commit 4aaa7a8122
16 files changed
+895 -356

No files matched your search

+3 -3
View File
@@ -302,7 +302,7 @@ def create_app(config=None):
if (app.config.get('WEBMENTION_ENABLED', True) and
response.content_type and
'text/html' in response.content_type):
response.headers['Link'] = '</webmention>; rel="webmention"'
response.headers.add('Link', '</webmention>; rel="webmention"')
return response
# Register centralized error handlers
@@ -459,5 +459,5 @@ def create_app(config=None):
# Package version (Semantic Versioning 2.0.0)
# See docs/standards/versioning-strategy.md for details
__version__ = "2.6.9"
__version_info__ = (2, 6, 9)
__version__ = "2.7.0"
__version_info__ = (2, 7, 0)