aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/templates/received.html
diff options
context:
space:
mode:
authorDennis Fink2026-11-17 14:44:00 +0100
committerDennis Fink2026-11-17 14:44:00 +0100
commit227092b57acc886469e16bcc4c0d3256e86d3d1e (patch)
treec1de8d5f8f3a37562e482f84e8017213c08a05d6 /webmentions_ssg/templates/received.html
parentf98b0e446b41325c494bd97900b7bbf730a7d67e (diff)
downloadwebmentions-ssg-227092b57acc886469e16bcc4c0d3256e86d3d1e.tar.gz
webmentions-ssg-227092b57acc886469e16bcc4c0d3256e86d3d1e.zip
feat(receiver): add source domain access rules
Add persistent source block and allow lists with authenticated management, single-row and bulk blocking actions, and optional fail-closed allowlist mode. Reject disallowed sources before enqueueing and recheck policy in verification workers, while sharing canonical hostname normalization across receiver, sender, and configuration paths.
Diffstat (limited to '')
-rw-r--r--webmentions_ssg/templates/received.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/webmentions_ssg/templates/received.html b/webmentions_ssg/templates/received.html
index de3a9b6..5fd9866 100644
--- a/webmentions_ssg/templates/received.html
+++ b/webmentions_ssg/templates/received.html
@@ -127,6 +127,17 @@ SPDX-License-Identifier: BSD-3-Clause
data-confirm-label="Reverify selected"
data-confirm-class="btn-primary">Reverify selected</button>
<button type="button"
+ class="btn btn-sm btn-outline-warning"
+ disabled
+ data-bs-toggle="modal"
+ data-bs-target="#confirmation-modal"
+ data-received-bulk-action="block-sources"
+ data-action="{{ url_for('webmentions.block_selected_received_sources', page=webmentions.page, **filters) }}"
+ data-title="Block selected source domains?"
+ data-message="Selected source domains and their subdomains will be blocked from future Webmentions. Existing Webmentions will be kept."
+ data-confirm-label="Block selected domains"
+ data-confirm-class="btn-warning">Block selected source domains</button>
+ <button type="button"
class="btn btn-sm btn-outline-danger"
disabled
data-bs-toggle="modal"
@@ -206,6 +217,15 @@ SPDX-License-Identifier: BSD-3-Clause
data-confirm-label="Reverify"
data-confirm-class="btn-primary">Reverify</button>
<button type="button"
+ class="btn btn-sm btn-warning"
+ data-bs-toggle="modal"
+ data-bs-target="#confirmation-modal"
+ data-action="{{ url_for('webmentions.block_received_source', webmention_uuid=webmention.uuid, page=webmentions.page, **filters) }}"
+ data-title="Block this source domain?"
+ data-message="Future Webmentions from this source hostname and its subdomains will be rejected."
+ data-confirm-label="Block domain"
+ data-confirm-class="btn-warning">Block this domain</button>
+ <button type="button"
class="btn btn-sm btn-danger"
data-bs-toggle="modal"
data-bs-target="#confirmation-modal"