diff options
| author | Dennis Fink | 2026-10-30 20:41:25 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-10-30 20:41:25 +0100 |
| commit | 53370723df05193938ce3c2d55a8e12f2a87b17b (patch) | |
| tree | e67ec12d3635d141bdc670fbfc5fa6bfb87cd69c /webmentions_ssg/url_security.py | |
| parent | 13a9d9ddce09230017699bc34ac3bf08ed2f84ed (diff) | |
| download | webmentions-ssg-53370723df05193938ce3c2d55a8e12f2a87b17b.tar.gz webmentions-ssg-53370723df05193938ce3c2d55a8e12f2a87b17b.zip | |
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.
Diffstat (limited to 'webmentions_ssg/url_security.py')
| -rw-r--r-- | webmentions_ssg/url_security.py | 4 |
1 files changed, 3 insertions, 1 deletions
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 |
