From 53370723df05193938ce3c2d55a8e12f2a87b17b Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Fri, 30 Oct 2026 20:41:25 +0100 Subject: fix(core): replace Huey pickle serialization with JSON Prevent broker-controlled task and result payloads from deserializing arbitrary Python objects by using a restricted JSON serializer with an explicit type allowlist. Fail closed on serializer overrides and document broker isolation and migration requirements for existing pickle-backed deployments. --- webmentions_ssg/url_security.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'webmentions_ssg/url_security.py') diff --git a/webmentions_ssg/url_security.py b/webmentions_ssg/url_security.py index f943c7e..4e7940b 100644 --- a/webmentions_ssg/url_security.py +++ b/webmentions_ssg/url_security.py @@ -19,7 +19,9 @@ class UnsafeAddressError(ValueError): """A hostname or IP literal identifies a non-public network address.""" -def public_addresses(hostname: str, *, lifetime: float | None = None) -> tuple[str, ...]: +def public_addresses( + hostname: str, *, lifetime: float | None = None +) -> tuple[str, ...]: """Resolve *once* and return only checked, globally routable IP addresses. A DNS name with a mixture of public and private answers is rejected in its -- cgit v1.3.1