aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/templates/sent_source.html
diff options
context:
space:
mode:
authorDennis Fink2026-10-29 18:03:15 +0100
committerDennis Fink2026-10-29 18:03:15 +0100
commit839f6bdc15391ab03e52a516a828b7ea157d724a (patch)
tree829be4ca19ad0e3323a65b7092ad434e0c1659d5 /webmentions_ssg/templates/sent_source.html
parentb8772268cc69d16860263bb1e3b03b2772d887e2 (diff)
downloadwebmentions-ssg-839f6bdc15391ab03e52a516a828b7ea157d724a.tar.gz
webmentions-ssg-839f6bdc15391ab03e52a516a828b7ea157d724a.zip
fix(sender): validate Webmention status URLs
Treat status URLs returned by remote endpoints as untrusted input so malformed or non-HTTP schemes cannot be persisted or exposed as clickable links. Preserve successful delivery when a Location header is invalid while rendering legacy unsafe status values as plain text in the admin interface.
Diffstat (limited to '')
-rw-r--r--webmentions_ssg/templates/sent_source.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/webmentions_ssg/templates/sent_source.html b/webmentions_ssg/templates/sent_source.html
index e840f8f..8d22068 100644
--- a/webmentions_ssg/templates/sent_source.html
+++ b/webmentions_ssg/templates/sent_source.html
@@ -154,7 +154,11 @@ SPDX-License-Identifier: BSD-3-Clause
{% if webmention.status_url is not none %}
<div>
<strong>Status:</strong>
- <a href="{{ webmention.status_url }}" class="text-break">{{ webmention.status_url }}</a>
+ {% if webmention.status_url | is_http_url %}
+ <a href="{{ webmention.status_url }}" class="text-break">{{ webmention.status_url }}</a>
+ {% else %}
+ <span class="text-break">{{ webmention.status_url }}</span>
+ {% endif %}
</div>
{% endif %}
</td>