aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/forms
diff options
context:
space:
mode:
authorDennis Fink2026-11-15 21:18:19 +0100
committerDennis Fink2026-11-15 21:18:19 +0100
commit9b00526ab79257b65cedd71595848f09ecf84279 (patch)
treef9dfc5c0934499d47499bf083bd864f72947958c /webmentions_ssg/forms
parent509d93b2976e353d29441a7a7b7e78ca466dc4fd (diff)
downloadwebmentions-ssg-9b00526ab79257b65cedd71595848f09ecf84279.tar.gz
webmentions-ssg-9b00526ab79257b65cedd71595848f09ecf84279.zip
refactor(core)!: clarify Webmention domain terminology
Rename ambiguous models, statuses, task modules, fields, and helpers so names reflect source documents, verification, endpoint discovery, and delivery state. Migrate persisted status values and database identifiers without losing existing Webmention data. BREAKING CHANGE: persisted status values and database schema names have changed, and several public Python names have been renamed.
Diffstat (limited to '')
-rw-r--r--webmentions_ssg/forms.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/webmentions_ssg/forms.py b/webmentions_ssg/forms.py
index c8ad0ba..1ce591d 100644
--- a/webmentions_ssg/forms.py
+++ b/webmentions_ssg/forms.py
@@ -104,7 +104,7 @@ class AllowedTargetHostname:
raise ValidationError(self.message or field.gettext("Invalid input."))
-class PublicIPLiteral:
+class RejectNonPublicIPLiteral:
"""Reject non-public IP literals without performing DNS in the web worker."""
def __call__(self, form: BaseForm, field: Field) -> None:
@@ -138,7 +138,12 @@ class WebmentionSubmissionForm(FlaskForm):
source = StringField(
"source",
- validators=[InputRequired(), MaxURLBytes(), StrictHTTPURL(), PublicIPLiteral()],
+ validators=[
+ InputRequired(),
+ MaxURLBytes(),
+ StrictHTTPURL(),
+ RejectNonPublicIPLiteral(),
+ ],
)
target = StringField(
"target",