aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/forms/validators.py
diff options
context:
space:
mode:
authorDennis Fink2026-10-30 20:41:25 +0100
committerDennis Fink2026-10-30 20:41:25 +0100
commit53370723df05193938ce3c2d55a8e12f2a87b17b (patch)
treee67ec12d3635d141bdc670fbfc5fa6bfb87cd69c /webmentions_ssg/forms/validators.py
parent13a9d9ddce09230017699bc34ac3bf08ed2f84ed (diff)
downloadwebmentions-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/forms/validators.py')
-rw-r--r--webmentions_ssg/forms/validators.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/webmentions_ssg/forms/validators.py b/webmentions_ssg/forms/validators.py
index e8f33eb..2ce2b5b 100644
--- a/webmentions_ssg/forms/validators.py
+++ b/webmentions_ssg/forms/validators.py
@@ -88,7 +88,7 @@ class AllowedHostname:
"""
try:
hostname = urlsplit(field.data).hostname
- except (ValueError, TypeError):
+ except ValueError, TypeError:
hostname = None
if hostname is not None and hostname in current_app.config["ALLOWED_HOSTNAMES"]:
return