From 227092b57acc886469e16bcc4c0d3256e86d3d1e Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Tue, 17 Nov 2026 14:44:00 +0100 Subject: 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. --- tests/test_net.py | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'tests/test_net.py') diff --git a/tests/test_net.py b/tests/test_net.py index 472ae91..6ff267d 100644 --- a/tests/test_net.py +++ b/tests/test_net.py @@ -25,7 +25,6 @@ from webmentions_ssg.net import ( is_http_url, is_public_address, media_type_of, - normalized_hostname, read_limited_body, resolve_public_addresses, ) @@ -343,19 +342,6 @@ def test_is_retryable_status(app: Flask, status: int, expected: bool) -> None: assert endpoint_discovery.is_retryable_status(status) is expected -@pytest.mark.parametrize( - ("url", "expected"), - [ - pytest.param("https://EXAMPLE.com./path", "example.com", id="trailing-dot"), - pytest.param("http://[2001:db8::1]/", "2001:db8::1", id="ipv6"), - pytest.param("https:///path", None, id="missing-host"), - pytest.param("http://[::1", None, id="malformed-ipv6"), - ], -) -def test_normalized_hostname(url: str, expected: str | None) -> None: - assert normalized_hostname(url) == expected - - @pytest.mark.parametrize( ("headers", "expected"), [ -- cgit v1.3.1